Fix Vercel rewrite rules to properly route API and SPA requests

cgen-92393578c8994082888fbf0b19757b56
This commit is contained in:
Builder.io 2025-11-16 01:24:59 +00:00
parent 8c77584aa1
commit 57c84fc80c

View file

@ -34,7 +34,10 @@
"permanent": true
}
],
"rewrites": [{ "source": "/(?!api).*", "destination": "/index.html" }],
"rewrites": [
{ "source": "/api/:path*", "destination": "/api/:path*" },
{ "source": "/(.*)", "destination": "/index.html" }
],
"headers": [
{
"source": "/assets/(.*)",