Skip to content
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

injectStyle blocked by CSP #1215

Closed
timarney opened this issue Feb 20, 2025 · 1 comment
Closed

injectStyle blocked by CSP #1215

timarney opened this issue Feb 20, 2025 · 1 comment

Comments

@timarney
Copy link

Depending on how a user configures a sites Content Security Policy (CSP)

The inline style can get blocked. Is there a prop or setting to make the "injectStyle" optional i.e. let the you handle loading the styles and or add the ability to pass a nonce to the style tag?

Running into errors --- in my case would prefer to handle loading the styles on my end vs the code trying to add a style tag.

Image Image
@fkhadra
Copy link
Owner

fkhadra commented Feb 21, 2025

Hey @timarney, a solution for now it to import from unstyled as described here #1189 (comment). You'll have to import the stylesheet as well

import 'react-toastify/dist/ReactToastify.css';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants