By platform

Content Security Policy by platform

The policy is the same everywhere. Where it goes, and what stops it arriving, differs: an nginx location block that drops it, an Apache redirect that never had it, a Next.js page rendered before any nonce existed.

Each page below is a complete, report-only config for one platform, with the problems particular to it. A Content Security Policy is the broadest of the controls browsers enforce on the code your pages load, and what client-side security is covers the rest.

What every config assumes

  • Report-only. Every config sets Content-Security-Policy-Report-Only, which blocks nothing. Read what it reports, then switch to enforcing.
  • A starting policy, not yours. The directives allow your own origin and little else, so a real site reports on its first page load.
  • A placeholder endpoint. The reports go to your-ingest-code on HeaderHawk's ingest URL. Any collector that accepts CSP reports works instead.
  • A stated check. Under each config is what was done to it: the server and version it ran on, or, where a platform cannot run locally, what it was validated against.