nuxt (SSR) CSP nonce not added to generated scripts

Viewed 251

anyone have made CSP strict-dynamic working on nuxt?

i've successfully added CSP headers to the page (nonce is genereated in nuxtServerInit and injected to cspScriptSrcHashes array into 'render:route' hook (and i can see it into rendered page CSP within teh browser);

the problem is that no nonce is added to scripts genereted by nuxt and its components;

i tried to set "nonce" prop in vuex store root, i also checked that csp is enabled in nuxt.config but nothing is working

the same thing is about hashes ('sha256' value in render.csp.hashAlgorithm)

on what i'm wrong?

thank you

0 Answers
Related