Same origin HTML, rewritten with one per-response nonce on every eligible
<script> and a matching Content-Security-Policy header.
Scripts inside <noscript> are not nonced.
| Direct origin | Rewrite Worker | |
|---|---|---|
| Open page | s1-origin…/ | s1…/ (protected document) |
| CSP header | none | script-src 'nonce-…' 'strict-dynamic'; … |
| Script tags | 50+ scripts; one stale old-origin-nonce |
Eligible scripts share one fresh nonce per request |
Run a read-only check in this browser. The result explains the response evidence; use the command-line section below for deeper inspection.
content-security-policy.<script> has nonce="…" matching that header.old-origin-nonce is gone; scripts inside <noscript> have no nonce.private, no-store.script-src CSP violations on the success path.# Before — typically no CSP curl -sI https://s1-origin.thecompany-lab.com/ | grep -i content-security-policy || echo "(no CSP)" # After — CSP + nonces curl -sI https://s1.thecompany-lab.com/ | grep -i content-security-policy curl -s https://s1.thecompany-lab.com/ | grep -o 'nonce="[^"]*"' | sort | uniq -c | head # Expect many scripts sharing ONE distinct nonce value curl -s https://s1.thecompany-lab.com/ | grep -c 'old-origin-nonce' # expect 0 curl -sI https://s1.thecompany-lab.com/ | grep -i cache-control
script-src 'nonce-…'<noscript>