A security policy can stop an unexpected script, but also block a legitimate payment flow or video player. The Content-Security-Policy-Report-Only header lets you observe policy violations without enforcing that policy's blocks. It is a preparation tool, not equivalent protection to enforcement.
The MDN reference explains the header and its distinction from an enforced policy. This article was checked on November 12, 2026. It does not provide a universal configuration to paste into every website.
Map workflows before domains
Begin with functions: sign-in, payment, images, forms and external tools. Identify required resources and their owners.
A domain list collected during one browsing session does not necessarily describe every workflow. Content loaded after consent, another language or a payment failure may follow a different branch.
For a small site, representative scenarios are more useful than a lengthy header whose origins nobody understands.
Treat reports as evidence to investigate
A report indicates that an operation would have encountered the tested policy. It does not automatically establish an attack or a need to allow the resource.
Distinguish functional requirements, unnecessary scripts and noise from extensions or unusual situations. Adding every reported origin to an allowlist quickly undermines the control.
Retain useful context: page, scenario and deployed version. Without it, accumulated reports can be as hard to use as missing information.
Our recommendation is to assign review ownership. Collecting reports is not the same as making decisions about them.
Protect collection itself
Reports can contain information about URLs and browsing context. Limit retained fields, access and retention.
Set a volume budget and a response to unusual noise. A public endpoint should not become an unlimited journal of everything visitors submit.
Inspect reports before forwarding them to an open channel. The same care used for application logs remains relevant here.
Use a low-stakes scenario to test that relevant evidence arrives and that sensitive context is not unnecessarily distributed.
Enforce through an explicit validation step
Choose a limited scope, test critical workflows and prepare a controlled return to the previous state. Compare the header actually received by browsers with what you intended to configure at the proxy.
Reporting can coexist with an enforced policy; understand which produces each result. Observation trouble does not justify randomly removing production protection.
This complements our browser-extension supply-chain article. A useful CSP comes from an understandable inventory and tests, not a growing set of exceptions added merely to silence the console.
Cover visual: generated editorial illustration, not an official screenshot.




Join the discussion
Comments
Loading comments…