Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🔧 chore(vercel): add SPA asset cache headers and no-store for dev proxy (#13151)

Inneicada9a06fc37
diff --git a/vercel.json b/vercel.json
index 9b52a217f1a..06953d1c83f 100644
--- a/vercel.json
+++ b/vercel.json
@@ -1,5 +1,54 @@
{
"buildCommand": "bun run build:vercel",
+ "headers": [
+ {
+ "source": "/spa/assets/(.*)",
+ "headers": [
+ {
+ "key": "Cache-Control",
+ "value": "public, max-age=86400, s-maxage=86400, stale-while-revalidate=604800, stale-if-error=86400, immutable"
+ },
+ {
+ "key": "CDN-Cache-Control",
+ "value": "public, max-age=86400, s-maxage=86400, stale-while-revalidate=604800, stale-if-error=86400, immutable"
+ }
+ ]
+ },
+ {
+ "source": "/_dangerous_local_dev_proxy",
+ "headers": [
+ {
+ "key": "Cache-Control",
+ "value": "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"
+ },
+ {
+ "key": "Pragma",
+ "value": "no-cache"
+ },
+ {
+ "key": "Expires",
+ "value": "0"
+ }
+ ]
+ },
+ {
+ "source": "/_dangerous_local_dev_proxy/:path*",
+ "headers": [
+ {
+ "key": "Cache-Control",
+ "value": "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"
+ },
+ {
+ "key": "Pragma",
+ "value": "no-cache"
+ },
+ {
+ "key": "Expires",
+ "value": "0"
+ }
+ ]
+ }
+ ],
"installCommand": "npx [email protected] install",
"rewrites": [
{