Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self' 'nonce-ENb21QT9vf4dEbbGNxh+DQ=='" #2822
Answered
by
srmagura
Sudeepkumar799
asked this question in
Q&A
-
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.
Answered by
srmagura
Jul 13, 2022
Replies: 2 comments 5 replies
-
Hey @Sudeepkumar799, you should be able to fix this with the |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
Sudeepkumar799
-
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.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @Sudeepkumar799, you should be able to fix this with the
nonce
optioncreateCache
. https://emotion.sh/docs/@emotion/cache#nonce