Skip to content
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

Add support for the report-to directive #357

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

martijnc
Copy link
Contributor

@martijnc martijnc commented Jul 8, 2024

This PR extends DirectiveSet with the report-to directive. It is part of CSP Level 3 and intended to replace the deprecated report-uri directive.

The report-to directive works with reporting endpoints (from Reporting). The endpoints need to be configured through another header (Reporting-Endpoints, previously Report-To). This PR only adds the CSP directive; this enables users to migrate to the new reporting API if they provide the endpoints (via a Reporting-Endpoints header) themselves.

I did not deprecate the report-uri directive because browsers ignore it when a report-to directive is present and the browser supports it. Not all (major) browsers support this directive currently, so report-uri is still usefull for reporting in all browsers.

Fixes #341

@Seldaek Seldaek merged commit a2be165 into nelmio:master Sep 23, 2024
14 checks passed
@Seldaek
Copy link
Member

Seldaek commented Sep 23, 2024

Thanks

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

Successfully merging this pull request may close these issues.

[3.2.0] The report-uri directive has been deprecated
2 participants