fix(caddy): add cache-control headers for assets, sw.js, and index.html

This commit is contained in:
Evie Gauthier committed 2026-04-06 12:33:58 -04:00
1 parent 8d5521598d
commit b7f46e10ca
1 file changed
+7
+7
View File
@@ -16,6 +16,13 @@
try_files {path} /index.html
# Content-hashed assets can be cached indefinitely — the filename changes on every build.
header /assets/* Cache-Control "public, max-age=31536000, immutable"
# Workbox SW must be revalidated on every load so the browser picks up updates.
header /sw.js Cache-Control "no-cache"
# index.html must not be cached so the browser always gets the latest app shell.
header /index.html Cache-Control "no-cache"
# Required for Sentry browser profiling (JS Self-Profiling API)
header Document-Policy "js-profiling"
}