fix(csp): allow X (Twitter) conversion pixel domains on hosted#5804
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Adds Reviewed by Cursor Bugbot for commit 527a60d. Configure here. |
527a60d to
5bc957e
Compare
Greptile SummaryThis PR allows the hosted X conversion pixel through the content security policy. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "fix(csp): allow X (Twitter) conversion p..." | Re-trigger Greptile |
Summary
uwt.jsfromstatic.ads-twitter.com, but that domain isn't in the CSPscript-src, so the browser blocks it — the pixel never loads and every landing pageview logs a CSP violation.https://static.ads-twitter.comtoscript-srcsouwt.jsloads.https://analytics.twitter.comtoconnect-srcso the pixel's conversion beacons (fetch/sendBeacon) can fire. Thet.coimage-pixel fallback is already covered by thehttps:wildcard inimg-src.isHosted, matching where the pixel<Script>is injected. Restores X ad conversion tracking and clears the console error.Type of Change
Testing
Verified the live
www.sim.aiCSP header lacked the ads-twitter/analytics.twitter domains; confirmed the injected pixel base code targets those domains. All 28 CSP tests pass.Checklist