mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-21 12:45:16 +02:00
🔧 Redirect node endpoints to cloud functions, for Netlify
This commit is contained in:
parent
c2f99d6d7f
commit
96d4deefa1
27
netlify.toml
27
netlify.toml
@ -7,25 +7,26 @@
|
|||||||
base = "/"
|
base = "/"
|
||||||
command = "yarn build"
|
command = "yarn build"
|
||||||
publish = "dist"
|
publish = "dist"
|
||||||
functions = "./services/serverless-functions"
|
functions = "services/serverless-functions"
|
||||||
|
|
||||||
# Site info, used for the 1-Click deploy page
|
# Site info, used for the 1-Click deploy page
|
||||||
[template.environment]
|
[template.environment]
|
||||||
STATUSKIT_PAGE_TITLE = "Dashy"
|
STATUSKIT_PAGE_TITLE = "Dashy"
|
||||||
STATUSKIT_COMPANY_LOGO = "https://raw.githubusercontent.com/Lissy93/dashy/master/docs/assets/logo.png"
|
STATUSKIT_COMPANY_LOGO = "https://raw.githubusercontent.com/Lissy93/dashy/master/docs/assets/logo.png"
|
||||||
STATUSKIT_SUPPORT_CONTACT_LINK = "https://dashy.to"
|
STATUSKIT_SUPPORT_CONTACT_LINK = "https://github.com/lissy93/dashy"
|
||||||
STATUSKIT_RESOURCES_LINK = "https://github.com/Lissy93/dashy/tree/master/docs"
|
STATUSKIT_RESOURCES_LINK = "https://dashy.to/docs"
|
||||||
|
|
||||||
# Specify handlers to redirect to serverless functions instead of Node API endpoints
|
# Redirect the Node endpoints to serverless functions
|
||||||
[[edge_handlers]]
|
[[redirects]]
|
||||||
path = "/status-check"
|
from = "/status-check"
|
||||||
handler = "cloud-status-check"
|
to = "/.netlify/functions/cloud-status-check"
|
||||||
[[edge_handlers]]
|
status = 301
|
||||||
path = "/config-manager/save"
|
force = true
|
||||||
handler = "not-supported"
|
[[redirects]]
|
||||||
[[edge_handlers]]
|
from = "/config-manager/*"
|
||||||
path = "/config-manager/rebuild"
|
to = "/.netlify/functions/not-supported"
|
||||||
handler = "not-supported"
|
status = 301
|
||||||
|
force = true
|
||||||
|
|
||||||
# Set any security headers here
|
# Set any security headers here
|
||||||
[[headers]]
|
[[headers]]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user