From 2f4336889d1d903fc2dc19a18d16bdd0a2cefd99 Mon Sep 17 00:00:00 2001 From: Randall Stillwell Date: Mon, 21 Jul 2025 21:40:19 -0500 Subject: [PATCH] Fix Vercel API routing configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🔧 Routing Fix: - Remove redundant API rewrite rule that was causing conflicts - Use negative lookahead regex to exclude API routes from frontend rewrites - Only rewrite non-API, non-static routes to index.html - This should resolve API endpoints returning HTML instead of JSON 🚀 Expected Result: - /api/* routes will now properly reach Vercel functions - Frontend routes will still work correctly - Static assets remain unaffected --- vercel.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/vercel.json b/vercel.json index be81e47..f908f82 100644 --- a/vercel.json +++ b/vercel.json @@ -1,11 +1,7 @@ { "rewrites": [ { - "source": "/api/(.*)", - "destination": "/api/$1" - }, - { - "source": "/(.*)", + "source": "/((?!api|static|_next).*)", "destination": "/index.html" } ],