We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
2.1.2
2.13.5
Currently we get the following error
Refused to apply inline style because it violates the following Content Security Policy directive: "style-src-elem 'self'
It boils down to the Rainbow Kit injecting styles into the page
There is currently no way to set the nonce on the style tag forcing us to use 'unsafe-inline' which is not ideal.
'unsafe-inline'
being able to pass down the nonce through the <RainbowKitProvider /> so that any and all script and style tags include the nonce
<RainbowKitProvider />
<RainbowKitProvider nonce={nonce}> .... <RainbowKitProvider />
the outcome should look like this:
Set your CSP headers for your application i.e.
const cspHeader = [ `default-src 'self';`, `script-src 'self' 'nonce-${nonce}';`, `style-src 'self' https://fonts.googleapis.com https://fonts.gstatic.com;`, `style-src-elem 'self' https://fonts.googleapis.com https://fonts.gstatic.com;`, `font-src 'self' https://fonts.googleapis.com https://fonts.gstatic.com;`, `frame-src 'self';`, `object-src 'none';`, ].join(" "); responseHeaders.set("Content-Security-Policy", cspHeader);
No response
There was this ticket #1256 about the same thing, but no resolution and it was closed.
The text was updated successfully, but these errors were encountered:
RK-134 [bug] CSP Headers cause issues
Sorry, something went wrong.
No branches or pull requests
Is there an existing issue for this?
RainbowKit Version
2.1.2
wagmi Version
2.13.5
Current Behavior
Currently we get the following error
It boils down to the Rainbow Kit injecting styles into the page
There is currently no way to set the nonce on the style tag forcing us to use
'unsafe-inline'
which is not ideal.Expected Behavior
being able to pass down the nonce through the
<RainbowKitProvider />
so that any and all script and style tags include the noncethe outcome should look like this:
Steps To Reproduce
Set your CSP headers for your application i.e.
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
No response
Anything else?
There was this ticket #1256 about the same thing, but no resolution and it was closed.
The text was updated successfully, but these errors were encountered: