fix: prevent Cloudflare from caching envs.js

envs.js is generated at container startup from environment variables.
Add Cache-Control: no-store header to ensure CDN/browser never serves
a stale version when config changes.
This commit is contained in:
2026-03-01 21:15:47 -08:00
parent 284d506593
commit b7ee2f142b
+10
View File
@@ -1,5 +1,15 @@
async function headers() {
return [
{
// envs.js is generated at container startup — must never be cached
source: '/assets/envs.js',
headers: [
{
key: 'Cache-Control',
value: 'no-store, no-cache, must-revalidate',
},
],
},
{
source: '/:path*',
headers: [