WD-36600: allow regional google.* domains in connect-src for GTM - #2542
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/WD-36600-csp #2542 +/- ##
========================================================
- Coverage 78.80% 78.77% -0.04%
========================================================
Files 16 16
Lines 1953 1969 +16
========================================================
+ Hits 1539 1551 +12
- Misses 414 418 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Ataku-B
left a comment
There was a problem hiding this comment.
How do we decide which regional Google domains to use here? Google has a supported domains list, could we use that as the source of regional Google domains?
|
@Ataku-B Nice! I didn't know that google provided a list like that. I suppose we can use that instead of what Gemini spat out. |
|
@Ataku-B updated handlers.py to fetch google domains dynamically. |
Done
www.google.*hostnames (EU, Americas, APAC, MEA) toconnect-srcinwebapp/handlers.pyso the GTMads/ga-audiencespixel can fire forvisitors in those regions.
QA
--lang+ cookie spoofing): load the homepage with the cookie banner accepted, then check DevTools → Network for theads/ga-audiencesrequest towww.google.<tld>and confirm it is not blocked by CSP.Refused to connect to 'https://www.google.<tld>/…' because it violates the following Content Security Policy directive: "connect-src …"for anyof the listed domains.
Content-Security-Policyresponse header againstmain— onlyconnect-srcshould grow; no other directive changes.