CSP ship checklist

A Content Security Policy should ship in report-only mode first. Report-only tells the browser to send violations and still load the page. Enforce the header only after you have read reports from real pages, including checkout and any tag manager.

Last updated .

Steps

  1. 1

    Compare the HTTP header and any meta Content-Security-Policy.

    Why. They can disagree. Browsers apply both in some cases, and a meta tag cannot set report-uri.

  2. 2

    Start with Content-Security-Policy-Report-Only, not the enforcing header.

    Why. Report-only tells the browser to send violations and still load the page.

  3. 3

    Point report-uri at a collector you can read.

    Why. CSP Radar ingests report-uri. It does not ingest the Reporting API directive report-to.

  4. 4

    Count inline scripts before you remove 'unsafe-inline'.

    Why. A hash or nonce has to match each inline script. Google Tag Manager injects scripts the homepage HTML does not show.

  5. 5

    Check more than the homepage.

    Why. Login, checkout, and the account page often load different hosts.

  6. 6

    Enforce on one route, watch reports, then widen the enforcing header.

    Why. One route shows what the enforcing header blocks before you apply that header to the rest of the site.

What a grade cannot tell you

A header scan does not run JavaScript, does not see tag-manager tags, and does not see other routes. Live CSP reports are how you see those.

Scan a homepage before you enforce

Email the report-only header pack

Nginx, Apache, Cloudflare Transform Rules, Next.js, Laravel, Rails, WordPress, and a note on Shopify. The snippets are starting points for report-only mode. They are not policies to enforce.

Privacy policy

Start a 7-day report-only trial. The trial is 7 days, then $49/month (Standard) or $349/month (Business).

FAQ

Should I enforce a Content Security Policy on day one?

No. Ship Content-Security-Policy-Report-Only first so the browser reports blocked hosts without blocking them.

Does CSP Radar collect report-to?

No. CSP Radar collects the legacy report-uri endpoint. A report-to group name is not delivered to CSP Radar.

Will this checklist give me a finished policy?

No. The header pack is a report-only starter. Real pages and tag managers add hosts a template cannot know.