-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When creating a new Sveltekit project from the demo template and configuring CSP rules that disallows inline styles you get a CSP violation on the #svelte-announcer element which is using inline styles without a nonce.
Reproduction
https://github.com/andersekdahl/svelte-csp-repro
- Clone the repo
- Run
npm run build && npm run preview
- Open the site and you'll see these errors attached as screenshots
The only thing changed from the demo project is this commit:
andersekdahl/svelte-csp-repro@53ebe42
Logs
No response
System Info
System:
OS: Windows 11 10.0.22631
CPU: (16) x64 11th Gen Intel(R) Core(TM) i9-11950H @ 2.60GHz
Memory: 6.04 GB / 31.73 GB
Binaries:
Node: 20.11.1 - C:\Program Files\nodejs\node.EXE
npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Chromium (122.0.2365.92)
Internet Explorer: 11.0.22621.1
npmPackages:
@sveltejs/adapter-auto: ^3.0.0 => 3.1.1
@sveltejs/kit: ^2.0.0 => 2.5.4
@sveltejs/vite-plugin-svelte: ^3.0.0 => 3.0.2
svelte: ^5.0.0-next.1 => 5.0.0-next.80
vite: ^5.0.3 => 5.1.6
Severity
serious, but I can work around it
Additional Information
No response
caleb531, dfinucane, cedricr, raphael-zenhaeusern-legic, voytxt and 1 moredennisregalado
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working