Skip to content

Local flag header background + strict nonce CSP / isolation headers - #33

Merged
DotNetRussell merged 4 commits into
mainfrom
fix/flag-bg-strict-csp
Jul 12, 2026
Merged

Local flag header background + strict nonce CSP / isolation headers#33
DotNetRussell merged 4 commits into
mainfrom
fix/flag-bg-strict-csp

Conversation

@DotNetRussell

Copy link
Copy Markdown
Collaborator

Summary

  • Use frontend/public/images/american_flag.jpg for the hero header background (replaces the ftcdn CDN URL).
  • Add Next.js 16 proxy.ts Content-Security-Policy with per-request nonces — production no longer allows script-src 'unsafe-inline' / 'unsafe-eval'.
  • Caddy sets COOP / CORP / COEP (credentialless) and no longer re-declares CSP (would defeat nonces).
  • Theme bootstrap script uses the nonce from the proxy.

Note on the flag asset

The JPG is present locally; if the binary is not yet on this branch due to upload limits, attach frontend/public/images/american_flag.jpg before merge or scp it into the frontend image. CSS already points at /images/american_flag.jpg.

Test plan

  • npm test (frontend)
  • npm run build (shows Proxy + dynamic routes)
  • After deploy: curl -sI https://operationchildshield.org/ | grep -iE 'content-security|cross-origin'
  • Confirm CSP has nonce and no unsafe-inline on script-src
  • Confirm header shows local flag art

@DotNetRussell
DotNetRussell merged commit 49955e3 into main Jul 12, 2026
2 checks passed
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