-
-
Notifications
You must be signed in to change notification settings - Fork 730
Inline style injection used in v11 not compatible with Content-Security-Policy #1209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey @GWellerGMSL, I see a couple of solutions for this
I'll work on solution 2 to provide a guide, seems like the more appropriate if you still want the style to be injected. |
IF you get here like I did because you have CSP enabled and you are getting a bunch of garbage in your browser (and maybe some complaints about nonces). You can just import the library like this: |
I tried to import |
@miki799 might be a cache issue, removing the |
@fkhadra Yep, it was a cache issue. Thanks! |
FYI, using react-toastify v11 with CSP response headers causes the following errors...
Using the undocumented
unstyled
import seems to resolve the issue, but this feels brittle to me. It would be great if you could explore other options for injecting the stylesheet.The text was updated successfully, but these errors were encountered: