mirror of
https://github.com/lobehub/lobehub
synced 2026-04-21 17:47:27 +00:00
🔧 chore(vercel): add SPA asset cache headers and no-store for dev proxy (#13151)
Made-with: Cursor
This commit is contained in:
parent
cd75228933
commit
cada9a06fc
1 changed files with 49 additions and 0 deletions
49
vercel.json
49
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 pnpm@10.26.2 install",
|
||||
"rewrites": [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue