-
Notifications
You must be signed in to change notification settings - Fork 121
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
Content-Security-Policy blocking inline styles #595
Comments
Hey @yesman82, thanks for opening this issue. We'll look into this and reply back sometime in the next few days 👍 |
Hey @yesman82 , we’ve looked into this Content Security Policy (CSP) issue some more and wanted to give an update. For example the The second CSP cited in the issue, Therefore, to address CSP issues you mentioned above, or any that might come up as a result of using drift, it’s recommended you take a look at the updated index.html in the project’s root directory. There, you’ll see an example of a CSP that specifically includes drift style tag hashes. When opened in the browser, you’ll note the page does not generate any CSP violations or errors related to any drift code execution. Please note that while it is possible for users to ‘allowlist’ drift by including Thank you again for bringing this issue to our attention and please feel free to open this again if there’s anything we might have missed. |
Describe the bug
CSP is used to prevent loading of unknown (external) content.
When using the CSP header (MDN - Content-Security-Policy) errors regarding inline styles are thrown.
Errors from Chrome
leading to
head.insertBefore(styleEl, head.firstChild);
which inserts a style node.which leads to
this.el.setAttribute("style","")
To Reproduce
Best way is to use incognito mode so other extensions don't interfere (but allow header modifying extension)
Steps to reproduce the behaviour:
Expected behaviour
Drift code not being blocked.
Information:
The text was updated successfully, but these errors were encountered: