feat(07-04): the static-asset cache policy — hashed assets immutable, HTML entry revalidating (T-07-20, D-06)
- web/public/_headers: /assets/* → public, max-age=31556952, immutable (Vite content-hashed output) - / → public, max-age=0, must-revalidate (the HTML entry points at the current hashed assets) - no CORS/Set-Cookie/other rules — same-origin policy stays the app's design - verified: web/dist/_headers exists after the theme+web build
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
# Cloudflare Workers static-assets cache policy (07-04, D-06).
|
||||||
|
# Vite emits content-HASHED files under /assets/* — a hashed URL's bytes can
|
||||||
|
# never change, so they are immutable for a year. The HTML entry is NOT
|
||||||
|
# hashed (it points at the current hashed assets) — it must revalidate on
|
||||||
|
# every visit or a stale entry would point at deleted asset files.
|
||||||
|
/assets/*
|
||||||
|
Cache-Control: public, max-age=31556952, immutable
|
||||||
|
|
||||||
|
/
|
||||||
|
Cache-Control: public, max-age=0, must-revalidate
|
||||||
Reference in New Issue
Block a user