Skip to content

Conversation

@alxndrsn
Copy link
Contributor

@alxndrsn alxndrsn commented Dec 3, 2025

This commit:

  • makes the frontend policy consistent with other policies which allow for Google Translate images
  • provides a template for addition of other browser-plugin-related policy
  • removes enforcement of policy order, although the served policies maintain their current ordering

Closes #1518

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

Existing tests, with a slight updated to ordering expectations.

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

Alternative: just hard-code the expected image. But in that case, it's fairly likely the issue will recur.

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 effect.

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

@alxndrsn alxndrsn changed the base branch from master to next December 3, 2025 12:32
@alxndrsn alxndrsn changed the title Frontend csp include google translate images CSP: frontend: allow Google Translate images Dec 3, 2025
This commit:

* makes the frontend policy consistent with other policies which allow for Google Translate images
* provides a template for addition of other browser-plugin-related policy
* removes enforcement of policy order, although the served policies maintain their current ordering

Closes getodk#1518

use more specific naming and avoid commentary
@alxndrsn alxndrsn force-pushed the frontend-csp-include-google-translate-images branch from 7d4f7f0 to 8092ac4 Compare December 3, 2025 12:35
@alxndrsn alxndrsn marked this pull request as ready for review December 3, 2025 12:36
@alxndrsn alxndrsn changed the title CSP: frontend: allow Google Translate images nginx/csp/frontend: allow Google Translate images Dec 3, 2025
@matthew-white matthew-white linked an issue Dec 3, 2025 that may be closed by this pull request
@alxndrsn alxndrsn merged commit 3cab387 into getodk:next Dec 3, 2025
5 checks passed
@alxndrsn alxndrsn deleted the frontend-csp-include-google-translate-images branch December 3, 2025 18:07
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.

nginx/csp: google translate rule is applied inconsistently

2 participants