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 report-to as well as report-uri #23

Open
tunetheweb opened this issue Mar 20, 2022 · 0 comments
Open

Add support for report-to as well as report-uri #23

tunetheweb opened this issue Mar 20, 2022 · 0 comments

Comments

@tunetheweb
Copy link
Collaborator

report-to is supposed to eventually replace the deprecated report-uri, though at present it is only supported in Chromium browsers. For now adbice is to use both CSP options until support is more complete.

report-to requires an addition Report-To HTTP Header with a JSON object, which is then referred to in the CSP header.

Report-To: { "group": "csp-endpoint",
              "max_age": 10886400,
              "endpoints": [
                { "url": "https://example.com/csp-reports" }
              ] }
Content-Security-Policy: ...; report-to csp-endpoint

Ideally we'd be able seemlessly add this in if the content_security_policy_report_uri was provided? But additionally, also allow explicit setting of the Report-To header separately if the user so desires.

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

No branches or pull requests

1 participant