Skip to content

fix(frontend): 404 no-store for missing static assets - #72

Merged
samcm merged 1 commit into
masterfrom
fix/asset-fallback-no-cache
Sep 30, 2026
Merged

samcm merged 1 commit into
masterfrom
fix/asset-fallback-no-cache

Conversation

@samcm

@samcm samcm commented Sep 30, 2026

Copy link
Copy Markdown
Member

Missing static assets (anything under assets/ or with a static file extension) now return 404 with Cache-Control: no-store instead of falling back to index.html. The fallback response was picking up the path-based long-cache header, so during rolling deploys Cloudflare cached HTML under hashed bundle URLs and lab.ethpandaops.io served "text/html" for its main script until the entry expired. Extensionless SPA routes still get index.html.

…of index.html

The SPA fallback served index.html for missing /assets/* files while the
path-based header policy gave the response a long public cache lifetime.
During rolling deploys a pod asked for another release's hashed bundle
returned HTML, Cloudflare cached it under the bundle URL, and the site
broke for everyone until the entry expired.
@samcm
samcm requested a review from mattevans as a code owner September 30, 2026 05:36

@redpandabot redpandabot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds a 404/no-store path for missing static assets so SPA fallback can't be cached under hashed asset URLs. Verified the handler's no-store correctly overrides the earlier middleware-set long-cache header, that the extension list plus the assets/ prefix covers the production policy's extension set, and that the new test compiles against real signatures (PrewarmRoutes takes any, LoadHeadData tolerates missing head.json) with all eight table cases consistent with the code. Clean.


Reviewed 2 changed file(s) @ 11f7c9ca — no blocking issues found.
"Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." — Douglas Hofstadter

@samcm
samcm merged commit 43bec19 into master Sep 30, 2026
3 checks passed
@samcm
samcm deleted the fix/asset-fallback-no-cache branch September 30, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant