bbc.co.uk · Headers
No Content-Security-Policy
Nothing limits where scripts can load from, so a script injected into a page would run.
- Send the policy below as Content-Security-Policy-Report-Only, and see what it would block.
- Add the sources your pages need to it.
- Then send it as Content-Security-Policy.
Content-Security-Policy-Report-Only: default-src 'self'; object-src 'none'; base-uri 'none'; frame-ancestors 'self'What it checks
The Content-Security-Policy header, and whether it limits scripts.
Why it matters
A CSP stops a script injected into a page from running: the main defence against cross-site scripting.