Repository navigation
Revalidate the frontend files on every load - #70
Merged
Merged
Conversation
nginx served the dashboard and stream page files without Cache-Control, so browsers cached them by guesswork and Cloudflare for 4 hours: after an update the old JavaScript kept running against the new server (the old dashboard polled /api/logs/session, which no longer exists). "expires epoch" sends Cache-Control: no-cache, so unchanged files cost a 304 and updates take effect on the next load. Fixes #69 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Tested in a throwaway container from
Container removed after the test. 🤖 Generated with Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #69
What changed
default.conf:expires epoch;(→Cache-Control: no-cache,Expiresin the past) on/login.html,/css/,/js/,/(the dashboard) and/stream/(the patched Selkies client). Browsers and Cloudflare then revalidate these files on every load: unchanged ones come back as 304 (nginx sendsLast-Modified/ETag), and a new image takes effect on the next page load.expiresisn'tadd_header, so the server-level security headers still apply in these locations.Why
Seen on the live install behind a Cloudflare tunnel right after deploying #66: Cloudflare served
/js/app.jsand/css/style.cssfrom cache (cf-cache-status: HIT,max-age=14400, previous image'slast-modified), so the old dashboard kept polling the removed/api/logs/session(404) and the new Logs window didn't appear.Testing
🤖 Generated with Claude Code