🔧 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:
Alicia Sykes 2021-11-07 14:53:56 +00:00 committed by GitHub
parent c0214cad99
commit c5dea1e1df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -16,12 +16,6 @@
STATUSKIT_SUPPORT_CONTACT_LINK = "https://github.com/lissy93/dashy"
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
[[redirects]]
from = "/status-check"
@ -33,6 +27,12 @@
to = "/.netlify/functions/not-supported"
status = 301
force = true
# For router history mode, ensure pages land on index
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
# Set any security headers here
[[headers]]