Skip to content

Commit 527a60d

Browse files
committed
fix(csp): allow X (Twitter) conversion pixel domains on hosted
1 parent 3d12a6d commit 527a60d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • apps/sim/lib/core/security

apps/sim/lib/core/security/csp.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ const STATIC_SCRIPT_SRC = [
6666
'https://*.hs-analytics.net',
6767
'https://*.hscollectedforms.net',
6868
'https://*.hs-banner.com',
69+
// X (Twitter) conversion pixel (landing pages) — the base code injects
70+
// uwt.js as a <script> tag from static.ads-twitter.com
71+
'https://static.ads-twitter.com',
6972
]
7073
: []),
7174
] as const
@@ -106,6 +109,10 @@ const STATIC_CONNECT_SRC = [
106109
// The visitor beacon itself is an image pixel (img-src, already
107110
// permitted below), not a connect-src request.
108111
'https://*.hscollectedforms.net',
112+
// X (Twitter) conversion pixel — uwt.js sends conversion beacons here
113+
// via fetch/sendBeacon. The t.co image-pixel fallback is already
114+
// covered by the `https:` wildcard in img-src.
115+
'https://analytics.twitter.com',
109116
]
110117
: []),
111118
] as const

0 commit comments

Comments
 (0)