Skip to content

Commit a3e0b3f

Browse files
hotlongCopilot
andcommitted
fix(vercel): disable HTML caching for SPA index pages
Rewrite cache was serving stale index.html with old asset hashes after deploys. Adding must-revalidate to non-asset paths under /_studio/, /_account/, and /_dashboard/ ensures the CDN refetches index.html on every deploy. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e4a7bc8 commit a3e0b3f

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

apps/objectos/vercel.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@
3333
"headers": [
3434
{ "key": "Cache-Control", "value": "public, max-age=31536000, immutable" }
3535
]
36+
},
37+
{
38+
"source": "/_studio/:path((?!assets/).*)?",
39+
"headers": [
40+
{ "key": "Cache-Control", "value": "public, max-age=0, must-revalidate" }
41+
]
42+
},
43+
{
44+
"source": "/_account/:path((?!assets/).*)?",
45+
"headers": [
46+
{ "key": "Cache-Control", "value": "public, max-age=0, must-revalidate" }
47+
]
48+
},
49+
{
50+
"source": "/_dashboard/:path((?!assets/).*)?",
51+
"headers": [
52+
{ "key": "Cache-Control", "value": "public, max-age=0, must-revalidate" }
53+
]
3654
}
3755
],
3856
"redirects": [

0 commit comments

Comments
 (0)