- 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
11 lines
475 B
Plaintext
11 lines
475 B
Plaintext
# 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
|