CSP violation explainer
Explain a Content-Security-Policy violation report and suggest a directive fix.
Runs in your browser. Your input is not uploaded.
What it does, how to use it, and questions
What it does
Browsers send Content-Security-Policy violation reports to a report-uri or via the Reporting API. The JSON names the blocked URI and the effective directive.
Paste a report to get a plain-English summary and a suggested allowlist change. Nothing is fetched.
How to use it
- Paste the report JSON.
- Read the summary and fields.
- Apply a deliberate policy change if you trust the blocked origin.
Things to watch for
- A suggestion is not a recommendation to weaken CSP. Prefer hashes and nonces for inline script.
- Report-only policies still emit reports; disposition tells you whether the load was blocked.
Questions
- What is effective-directive?
- The directive that blocked the load, such as
script-srcorimg-src. - Why is blocked-uri inline?
- An inline script or style ran without a nonce or hash.
- Does this fetch the blocked URL?
- No.
- Which report shapes work?
- Classic
csp-reportobjects and Reporting API bodies witheffectiveDirective/blockedURL.