You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using nonce for styles where style tags are getting blocked but not the style attribute. I'm getting the CSP error in the console for the style attribute but the style is getting applied for the element. Can anyone please help me resolving this issue.
Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self' localhost:3000 unsafe-hashes 'report-sample' 'nonce-7LV1f57teStNOnc3tYd44w=='". Either the 'unsafe-inline' keyword, a hash ('sha256-8f935d27GvUutRyY9yWScUMiFUk4WTdZURISiYfPOeQ='), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm using nonce for styles where style tags are getting blocked but not the style attribute. I'm getting the CSP error in the console for the style attribute but the style is getting applied for the element. Can anyone please help me resolving this issue.
Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self' localhost:3000 unsafe-hashes 'report-sample' 'nonce-7LV1f57teStNOnc3tYd44w=='". Either the 'unsafe-inline' keyword, a hash ('sha256-8f935d27GvUutRyY9yWScUMiFUk4WTdZURISiYfPOeQ='), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present.
Beta Was this translation helpful? Give feedback.
All reactions