mirror of
https://github.com/Lissy93/dashy.git
synced 2024-12-26 02:14:27 +03:00
🔧 Move catch-all redirect after serverless funcs
The catch-all redirect is required for Vue's HTML5 history mode to work on Netlify. However the current configuration was redirecting everything, including the API endpoints to index.html, preventing the serverless functions (for status checking, config management, etc) from working. 🤞 Hopefully this will work...
This commit is contained in:
parent
c0214cad99
commit
c5dea1e1df
12
netlify.toml
12
netlify.toml
@ -16,12 +16,6 @@
|
|||||||
STATUSKIT_SUPPORT_CONTACT_LINK = "https://github.com/lissy93/dashy"
|
STATUSKIT_SUPPORT_CONTACT_LINK = "https://github.com/lissy93/dashy"
|
||||||
STATUSKIT_RESOURCES_LINK = "https://dashy.to/docs"
|
STATUSKIT_RESOURCES_LINK = "https://dashy.to/docs"
|
||||||
|
|
||||||
# For router history mode, ensure pages land on index
|
|
||||||
[[redirects]]
|
|
||||||
from = "/*"
|
|
||||||
to = "/index.html"
|
|
||||||
status = 200
|
|
||||||
|
|
||||||
# Redirect the Node endpoints to serverless functions
|
# Redirect the Node endpoints to serverless functions
|
||||||
[[redirects]]
|
[[redirects]]
|
||||||
from = "/status-check"
|
from = "/status-check"
|
||||||
@ -34,6 +28,12 @@
|
|||||||
status = 301
|
status = 301
|
||||||
force = true
|
force = true
|
||||||
|
|
||||||
|
# For router history mode, ensure pages land on index
|
||||||
|
[[redirects]]
|
||||||
|
from = "/*"
|
||||||
|
to = "/index.html"
|
||||||
|
status = 200
|
||||||
|
|
||||||
# Set any security headers here
|
# Set any security headers here
|
||||||
[[headers]]
|
[[headers]]
|
||||||
for = "/*"
|
for = "/*"
|
||||||
|
Loading…
Reference in New Issue
Block a user