Open KarthikeyanRanasthala opened 4 years ago
Any news regarding this issue? @KarthikeyanRanasthala
I contributed an example to Next.js repo many years ago. But its no longer available.
You can look into https://github.com/vercel/next.js/pull/23021 and https://github.com/vercel/next.js/tree/canary/examples/with-strict-csp to get an idea.
TBH, I haven't tried it out in app router, so lemme know how it goes.
I updated to version 14, but I still use Page Router. Where can I apply "registry.styles({ nonce })"? In my project I use Next.js + styled-jsx. And it is precisely in the styled-jsx styles that the "nonce" is not being applied in the DOM.
Do you want to request a feature or report a bug?
Yes, Improve documentation. Please add relevant details/steps on adding nonce for Content Security Policy with styled-jsx + next.js As next.js handles styled-jsx internally, the current mentioned method in the doc is not applicable. This is a major concern as all the next.js apps using styled-jsx have to add 'unsafe-inline' in the CSP. I would request the maintainers to take up this on priority.