With a nonce (pages, set per request by proxy.ts): Next reads the nonce from
this header and puts it on its own scripts, and 'strict-dynamic' trusts what
those load (Vercel Analytics), so no injected inline script runs. The hosts
after it only matter to browsers too old for 'strict-dynamic'.
Without one (next.config.ts, for everything the proxy skips, such as the 404
for a dotted path): Next adds no nonces there, so inline scripts have to stay
allowed. If a host sends both headers, the browser enforces both, which is
still the nonce policy.
Styles keep 'unsafe-inline' either way: a nonce in style-src would switch it
off, and Tailwind and framer-motion set style attributes nonces can't cover.
'unsafe-eval' is dev-only (React uses eval for its error overlays).
The site's Content-Security-Policy.
With a nonce (pages, set per request by proxy.ts): Next reads the nonce from this header and puts it on its own scripts, and 'strict-dynamic' trusts what those load (Vercel Analytics), so no injected inline script runs. The hosts after it only matter to browsers too old for 'strict-dynamic'.
Without one (next.config.ts, for everything the proxy skips, such as the 404 for a dotted path): Next adds no nonces there, so inline scripts have to stay allowed. If a host sends both headers, the browser enforces both, which is still the nonce policy.
Styles keep 'unsafe-inline' either way: a nonce in style-src would switch it off, and Tailwind and framer-motion set style attributes nonces can't cover. 'unsafe-eval' is dev-only (React uses eval for its error overlays).