Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self' 'nonce-ENb21QT9vf4dEbbGNxh+DQ=='" #2822
-
The Problem:I am getting following error when I add CSP headers in my application. To handle inline styles and scripts violation I am adding nonce using csp-html-webpack-plugin. But I am still seeing this issue. Any help will be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hey @Sudeepkumar799, you should be able to fix this with the |
Beta Was this translation helpful? Give feedback.
-
I ran into this error when I was accidentally creating styles in the same element that was rendering |
Beta Was this translation helpful? Give feedback.
Hey @Sudeepkumar799, you should be able to fix this with the
nonce
optioncreateCache
. https://emotion.sh/docs/@emotion/cache#nonce