Skip to content

feat: Enable CSP with Nonce in the Report Only Header #840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 27, 2025

Conversation

andreituicu
Copy link
Collaborator

@andreituicu andreituicu commented Mar 17, 2025

I observed a number of customers that only use the content-security-policy-report-only header.
This header enables the CSP in a nonblocking fashion, simply reporting potential violations to a specified endpoint.
It could make it more comfortable for customers to try out the nonce + strict-dynamic based CSP if they could do it in production, without affecting the website for start.

Note: according to https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy-Report-Only , this header is not supported as a meta tag.

@andreituicu andreituicu requested a review from tripodsan March 17, 2025 11:13
Copy link

codecov bot commented Mar 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e609c76) to head (6bcbf58).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #840   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           46        46           
  Lines         3943      3970   +27     
=========================================
+ Hits          3943      3970   +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andreituicu andreituicu merged commit 33ab7e1 into main Mar 27, 2025
9 checks passed
@andreituicu andreituicu deleted the csp-report-only branch March 27, 2025 12:38
github-actions bot pushed a commit that referenced this pull request Mar 27, 2025
# [6.24.0](v6.23.0...v6.24.0) (2025-03-27)

### Features

* Enable CSP with Nonce in the Report Only Header ([#840](#840)) ([33ab7e1](33ab7e1))
Copy link

🎉 This PR is included in version 6.24.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants