- Challenge pages (
cap.use_nonce = true): every challenge render gets a fresh per-request nonce, applied to the page’s inline scripts/styles and exposed to Cap’s widget viawindow.CAP_CSS_NONCE/window.CAP_SCRIPT_NONCE. AContent-Security-Policyheader is emitted (script-src 'nonce-…' 'strict-dynamic' 'wasm-unsafe-eval', plusstyle-/img-/font-/connect-srcallowlists derived fromcap.api_url,cap.verify_url,cap.widget_script_url, and thebranding.*URLs). Override it entirely withcap.csp, using{nonce}as a placeholder for the per-request nonce. - Proxied responses (
response_csp): a static policy applied to every upstream response, unless the upstream already sent its ownContent-Security-Policy. It can’t use nonces (verifyngo can’t inject them into HTML it doesn’t own), so include'unsafe-inline'/'unsafe-eval'as your app requires.
Configuration
Automatic CSP
verifyngo can emit Content-Security-Policy headers in two different places, depending on the response type: