Skip to content

footer 0.4.0: inline newsletter feedback; script hash + pit.world in CSP - #17

Merged
ralyodio merged 1 commit into
mainfrom
footer-040
Oct 26, 2026
Merged

ralyodio merged 1 commit into
mainfrom
footer-040

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Bumps @profullstack/footer to ^0.4.0 (bun.lock 0.4.0). 0.4.0 posts the footer newsletter form as JSON to https://pit.world/api/subscribe from a small inline script and shows "Email confirmation sent" or "Failed: " inline.

CSP changes so that actually runs here:

  • script-src has no 'unsafe-inline' and the footer HTML is cached across requests, so a per-request nonce cannot reach it. ring-footer.ts now exposes the 'sha256-…' hashes of the footer's inline scripts (recomputed when the cached footer changes) and the header middleware adds them to script-src.
  • connect-src adds https://pit.world (the JSON POST).
  • form-action adds https://pit.world (the no-script fallback POST, which was silently dropped before).

tsc --noEmit and bun test (17 pass) locally.

🤖 Generated with Claude Code

Bumps @profullstack/footer to ^0.4.0 (bun.lock 0.4.0). 0.4.0 posts the footer newsletter form as JSON to https://pit.world/api/subscribe from a small inline script and shows "Email confirmation sent" or "Failed: <why>" inline.

CSP changes so that actually runs here:
- script-src has no 'unsafe-inline' and the footer HTML is cached across requests, so a per-request nonce cannot reach it. ring-footer.ts now exposes the 'sha256-…' hashes of the footer's inline scripts (recomputed when the cached footer changes) and the header middleware adds them to script-src.
- connect-src adds https://pit.world (the JSON POST).
- form-action adds https://pit.world (the no-script fallback POST, which was silently dropped before).

tsc --noEmit and bun test (17 pass) locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit fbbbca6 into main Oct 26, 2026
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