fkhadra / fkhadra/react-toastify

Inline style injection used in v11 not compatible with Content-Security-Policy

Open
#1,209 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
13.4k
Forks
741
PR merge metrics
No merged PRs in 30d

Description

FYI, using react-toastify v11 with CSP response headers causes the following errors...

```
Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.
```

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.