From 57c84fc80ca5de631ac18c3b026f8978d52b5903 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sun, 16 Nov 2025 01:24:59 +0000 Subject: [PATCH] Fix Vercel rewrite rules to properly route API and SPA requests cgen-92393578c8994082888fbf0b19757b56 --- vercel.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index 30feb0d3..cc79e2f6 100644 --- a/vercel.json +++ b/vercel.json @@ -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/(.*)",