Vite CSP support #454
dargmuesli
started this conversation in
Ideas
Replies: 1 comment 9 replies
-
Hey @dargmuesli Thanks for this interesting idea! I like where this js going but I would wait for @vejja who is our expert in this area to share his feedback :) |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey @vejja,
I think we can add a meta header that resolves issues with Vite and CSP now:
property="csp-nonce" nonce="..."
(docs)maybe in a style similar to this: https://github.com/Baroshem/nuxt-security/blob/8305b48079dc7c0ef83a16d3f6de24dfc41e563b/src/runtime/nitro/plugins/60-cspSsgHashes.ts#L108
I haven't used cheerio before, therefore I'm not sure.
https://github.com/Baroshem/nuxt-security/blob/8305b48079dc7c0ef83a16d3f6de24dfc41e563b/docs/content/1.documentation/2.headers/1.csp.md?plain=1#L222
What do you think? 🎉
cc @Baroshem of course
Beta Was this translation helpful? Give feedback.
All reactions