From 5263c65571964c721a9a104898357b01a51418e4 Mon Sep 17 00:00:00 2001 From: Satya Patel Date: Thu, 26 Feb 2026 15:55:36 -0800 Subject: [PATCH] fix(api): prevent Vercel CDN from caching Electric responses Vercel's edge cache can serve stale shape data for Electric requests because it doesn't properly handle offset-based cache keying. Disable Vercel CDN caching on the Electric proxy route per Electric's docs. --- apps/api/vercel.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 apps/api/vercel.json diff --git a/apps/api/vercel.json b/apps/api/vercel.json new file mode 100644 index 00000000000..5870d3a8598 --- /dev/null +++ b/apps/api/vercel.json @@ -0,0 +1,11 @@ +{ + "headers": [ + { + "source": "/api/electric/(.*)", + "headers": [ + { "key": "CDN-Cache-Control", "value": "no-store" }, + { "key": "Vercel-CDN-Cache-Control", "value": "no-store" } + ] + } + ] +}