-
Notifications
You must be signed in to change notification settings - Fork 134
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 issue #18
Comments
@satendra02 : I forgot to build after updating to the suggested hash. Just rebuild and now it work! |
Is there a away to fix the issue that whenever extension is rebuilt, then a new hash is required for manifest.json? |
Hi @zenzjtech If you are using any inline script in The Hash generated in the console will be the same if there is no change in the script block code every time you build. For more read this article. You can remove that hash if you are not using any external js in
If you are using any external script like below inside your
A relaxed policy definition looks like:
If all the above is not the case then do these steps and let me know if it works.
I hope it helps! For more read below for relaxing CSP: https://developer.chrome.com/extensions/contentSecurityPolicy |
Hello,
Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'sha256-GgRxrVOKNdB4LrRsVPDSbzvfdV4UqglmviH9GoBJ5jk='". Either the 'unsafe-inline' keyword, a hash ('sha256-N/tHXVVQthcO77tcS7VT2tmLWxdumYi73F87h+hd5s0='), or a nonce ('nonce-...') is required to enable inline execution.
My manifest.json - I tried both hashes: the default one, and the suggested in the error message, but none of them work.
The text was updated successfully, but these errors were encountered: