-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat(csp): Add support for Reporting API #3277
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc. @oioki once this is merged, we will have support for new CSP format |
Dav1dde
reviewed
Mar 18, 2024
ty: String, | ||
body: CspRaw, | ||
|
||
/// For forward compatibility. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The field seems unused and the struct is also never serialized, seems like that does nothing and can be removed.
Dav1dde
approved these changes
Mar 19, 2024
Dav1dde
approved these changes
Mar 19, 2024
3 tasks
This was referenced Mar 20, 2024
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for Reporting API to CSP security reports.
Reporting API has slightly different format for the CSP report body, but the biggest difference that browser sends the CSP reports in batches.
Since we also want to support old format, I've tried to minimize the changes and re-used as much code as I could.
related: getsentry/sentry-docs#9440
fix: #2645
related: getsentry/sentry#38940