Skip to content

csp: include report samples where supported#1691

Draft
alxndrsn wants to merge 1 commit intogetodk:nextfrom
alxndrsn:style-src-report-sample
Draft

csp: include report samples where supported#1691
alxndrsn wants to merge 1 commit intogetodk:nextfrom
alxndrsn:style-src-report-sample

Conversation

@alxndrsn
Copy link
Contributor

@alxndrsn alxndrsn commented Mar 15, 2026

This should help to understand future violations more easily.

See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy#report-sample

Related: #1687

What has been done to verify that this works as intended?

  • tests/CI
  • tested on dev.getodk.cloud & reviewed Sentry reports

Why is this the best possible solution? Were any other approaches considered?

Alternative approach would be to only include in directives relevant to #1687

However, there might be future cases where seeing samples would be useful.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

No risk perceived:

  • directives which are not understood should be ignored by browsers
  • CSP-Report-Only issues shouldn't have any effects on the user anyway

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

  • branched off and targeted the next branch OR only changed documentation/infrastructure (master is stable and used in production)
  • verified that any code or assets from external sources are properly credited in comments or that everything is internally sourced

This should help to understand future violations more easily.

Related: getodk#1687
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.

1 participant