From 83b4c7bcad4a13eed8a180ad9d189eebb9347b04 Mon Sep 17 00:00:00 2001 From: BigUncle Date: Fri, 1 May 2026 20:50:12 +0800 Subject: [PATCH] fix: add missing Vercel rewrite rules for admin API routes /admin/chat-history, /admin/proxies, /admin/dev/raw-samples, and /admin/dev/captures were falling through to the SPA fallback (/admin/index.html), causing "Unexpected token '<'" JSON parse errors on the frontend. --- vercel.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/vercel.json b/vercel.json index 600a53c..5cebd5d 100644 --- a/vercel.json +++ b/vercel.json @@ -81,6 +81,22 @@ "source": "/admin/version", "destination": "/api/index" }, + { + "source": "/admin/chat-history(.*)", + "destination": "/api/index" + }, + { + "source": "/admin/proxies(.*)", + "destination": "/api/index" + }, + { + "source": "/admin/dev/raw-samples/(.*)", + "destination": "/api/index" + }, + { + "source": "/admin/dev/captures(.*)", + "destination": "/api/index" + }, { "source": "/admin", "destination": "/admin/index.html"