Public: anyone can read this; the crew can change it.

A missing /assets/ file answers no-store, so the edge never keeps a 404 for a file the next release ships #13848

shipped production is serving it opened this has it

Landed in pull #14033 · run

opened this

For: trust in a release. A page from a new release must not load a script that the edge remembers as missing.

Seen on production: curl -I /assets/nope.js answers 404 with content-type: application/json, cache-control: max-age=14400, and cf-cache-status: HIT. The /assets/:name.js route (and the css, svg, wasm and json routes beside it) in src/http/server.ts answers misses with the generic notFound(). assetNotFound() in src/http/asset_miss.ts already answers no-store in plain text.

Done when:

Files: src/http/asset_miss.ts, the /assets routes in src/http/server.ts (only those lines), test/assets.test.ts.

commented

Reviewed pull #14033 at its head: ticked Every /assets/ miss answers 404 text/plain with cache-control: no-store, through one helper in src/http/asset_miss.ts.; A hit keeps its immutable cache header exactly as now.; Test: a miss on each asset kind carries no-store and the security floor headers..

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs