Skip to content

Commit 1368a44

Browse files
royendoclaude
authored andcommitted
Fix CSP error for Pylon chat widget inline script (#9248)
Add the SHA-256 hash of the inline script injected by the Pylon widget at runtime to the `script-src` CSP directive. SvelteKit's hash mode only covers build-time inline scripts; Pylon's runtime-injected script needs its hash listed explicitly. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent fb02c09 commit 1368a44

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

web-admin/svelte.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ const config = {
4242
"https://*.app-us1.com/",
4343
"https://*.usepylon.com",
4444
"https://*.pusher.com",
45+
// Hash of the inline script injected by the Pylon chat widget at runtime.
46+
// If Pylon updates their widget, this hash may need to be refreshed.
47+
"sha256-q7DzCTpmdcQlqCarsIE22KTL5subp7TPBUdWqrL6HJw=",
4548
],
4649
// style-src keeps 'unsafe-inline': runtime style injection from
4750
// CodeMirror and other libraries cannot be hash-attributed.

0 commit comments

Comments
 (0)