Skip to content

Stop the browser from mixing UI files from two deploys - #44

Merged
jacobprall merged 1 commit into
mainfrom
jacob/ui-no-cache
Sep 24, 2026
Merged

jacobprall merged 1 commit into
mainfrom
jacob/ui-no-cache

Conversation

@jacobprall

Copy link
Copy Markdown
Collaborator

After a deploy, a browser could load the new index.html with a cached app.js from the previous deploy. The old script looked up #api-url, which the new page no longer has, and the UI showed "Request failed: Cannot set properties of null (setting 'hidden')".

The gateway now serves every UI page, script, and stylesheet with Cache-Control: no-cache, so the browser revalidates each file on load. Basic Auth still guards each route.

A test in tests/gateway.test.ts checks the header on all six UI routes.

Made with Cursor

@jacobprall
jacobprall merged commit 278308b into main Sep 24, 2026
3 checks passed
@jacobprall
jacobprall deleted the jacob/ui-no-cache branch September 24, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant