CSP with Next.js App Router: SSR Case Study

I’ve seen a lot of teams ship a Content Security Policy in Next.js, feel good for a day, then quietly loosen it with 'unsafe-inline' and broad host allowlists because SSR made everything awkward. That usually happens when a React app grows into a real product: analytics, consent banners, A/B testing, third-party embeds, and a pile of server-rendered pages under the App Router. CSP stops being a checkbox and turns into an operational problem. ...

May 21, 2026 · 6 min · headertest.com