-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[CSP] Blocks data-emotion inline styles #36095
Comments
@jnschbrt It might be faster to resolve your problem if you open the issue at emotion repo directly. |
I don't see any issue, CSP needs to be configured: https://mui.com/material-ui/guides/content-security-policy/#server-side-rendering-ssr, it doesn't look like it was configured in the bug reports. @brijeshb42 This looks like we should move the CSP guide to be under https://mui.com/system/getting-started/. |
and you need to point that we can only config the nonce with a server side rendering project and do not have any information about how to properly achieve this on a build that render on client. |
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example:
Steps:
Current behavior 😯
I dont know why, but I keep getting these empty inline "data-emotion" style tags ..
setting the style-src directive as "style-src 'self' 'sha256-2NO5...' 'sha256-47DE...';" with the full hashes from the emotion library works. but i dont wanna bind the csp header to this settings. i reckon the hashes change with future mui versions.
Expected behavior 🤔
no data-emotion inline style tags
Context 🔦
I dont use server-side-rendering.
I upload the build output files directly to my aws cloudfront instance.
Your environment 🌎
npx @mui/envinfo
using chrome and edge
The text was updated successfully, but these errors were encountered: