-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Describe the bug
Using streaming disables the "built in" CSP support and this is not documented clearly (reading both the CSP and streaming doc). The workaround is to use my own CSP in a handle hook, but to support streaming I have to add script-src: 'unsafe-inline' which is undesirable. I was not able to find the nonce in the handle hook that is referenced in the doc.
Reproduction
https://github.com/vegardok/sveltekit-csp-and-streaming/commits/main/
Logs
No response
System Info
System:
OS: macOS 14.3
CPU: (10) arm64 Apple M2 Pro
Memory: 295.05 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
pnpm: 8.14.0 - ~/.nvm/versions/node/v20.9.0/bin/pnpm
Browsers:
Chrome: 121.0.6167.85
Safari: 17.3
npmPackages:
@sveltejs/adapter-auto: ^3.0.0 => 3.1.1
@sveltejs/kit: ^2.0.0 => 2.5.0
@sveltejs/vite-plugin-svelte: ^3.0.0 => 3.0.2
svelte: ^4.2.7 => 4.2.9
vite: ^5.0.3 => 5.0.12Severity
serious, but I can work around it
Additional Information
No response
seanlail, dennisregalado, hmn2107, keyboardwarlord, jamesbirtles and 1 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working