fix: bring index.html level with the deployed copy #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/index-drift"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Eleven of the twelve runtime files here were already byte-identical to
oddie-apps/static-sites/sites/www.lindner.earth/.index.htmlwas the twelfth, 8,638 bytes against 9,516 live, and the whole difference was the Plausible tag (252859d, 2026-08-12) and?v=1cache-busting (599e711, 2026-07-12). Copying the deployed file back makes it byte-identical, so the hazard is removed rather than documented: #2 put a warning inAGENTS.md, and someone who does not readAGENTS.mdwas still onecpfrom silently deleting analytics from production.Consequences of the port
src="./js/xq.js"with no query, so the cache-busting broke it. Widened to accept?v=<n>; it still rejectssrc/xq.jsand_xq_unscrambled.js.index.htmlnow loads a script fromstats.oddie.app, which this repository'sCaddyfileCSP did not allow. Added toscript-srcandconnect-src. The result is directive-for-directive identical to whatwww.lindner.earthactually serves, diffed against the live response header.New test, and the review that fixed it
Every absolute script origin
index.htmlloads must be permitted by theCaddyfilescript-src. That is the check that was missing; the drift it catches is exactly the one this PR repairs.The first version matched substrings.
codex exec --sandbox read-onlynamed three ways that is not what CSP means, all three real, all three fixed by matching source-list tokens:'self'resolves against the canonical URL,https://*.hostmatches a subdomain and not the bare host, and an allowed origin is compared as an origin.Proved it can fail, and proved it does not fail where CSP permits
One mutation each, restoring between:
<script src='https://evil.example/a.js'><script src = "https://evil.example/a.js"><script src=https://evil.example/a.js>script-srccarrying onlyhttps://stats.oddie.app.evilhttps://www.lindner.earth/a.jsunder'self'https://*.oddie.appcovering the loadedstats.oddie.appThe first three passed against the substring version. They are the regressions the review caught, not hypotheticals.
The
connect-srchalf is not mechanically checked and its failure is silent, so it is in Known Pitfalls instead.npm test: 24 passing.npm run check: bundle current.Refs #1