Skip to content
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 error for bundle js files #148

Open
AnweshGangula opened this issue Oct 24, 2024 · 2 comments
Open

Content Security Policy error for bundle js files #148

AnweshGangula opened this issue Oct 24, 2024 · 2 comments

Comments

@AnweshGangula
Copy link

AnweshGangula commented Oct 24, 2024

Since a week, I have been receiving below error when I'm trying to use my extension which was working fine. I did not make any change in the code.

Refused to load the script 'chrome-extension://2a0537bb-6706-4dfa-b5f7-c1675289a43c/assets/src/entries/contentScript/primary/main.d2e7ec72.js' because it violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules' http://localhost:* http://127.0.0.1:*". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

The script mentioned above is the bundled script file generated by running vite build

A question has been posted regarding this in stack-overflow.

@SleepyStew
Copy link

SleepyStew commented Oct 24, 2024

@AnweshGangula

Hey! I posted a solution in #146

@AnweshGangula
Copy link
Author

I tried this out, it doesn't seem to solve the issue.

Looks like a similar issue was posted in crxjs: crxjs/chrome-extension-tools#927

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants