-
Notifications
You must be signed in to change notification settings - Fork 424
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 (CSP) does not work in Firefox #1186
Comments
What exactly does not work? Do you see error messages? |
i'm running into the same issue. i get CSP blocked console error messages:
Firefox: 78.10.0esr |
For me - scripts don't work (don't run at all, can't execute even a single line of code) "Modify existing content security policy (CSP) headers" is "Yes" here other sites with CSP such as github or google seem to work fine tho. FF: 94.0.2 (64-bit) |
A fix is available at 4.18.6163 (xpi) You have to either configure the userscript to use experimental // @sandbox JavaScript or force a Please install the BETA version or check for BETA version updates at For a quick fix please export your settings and scripts as zip or (JSON) file at the "Utilities" tab and import it back at the fixed BETA version. |
@derjanb I confirm the new version with Thanks! |
EDIT: I cannot replciate this, so please ignore.
|
When I add |
I have no luck with this. I installed the latest beta and I'm trying to inject jquery in to sites(I have a master script which records some site info and I want to avoid jquery conflicts and only load it if it's not available: The resource at “https://code.jquery.com/jquery-3.2.1.slim.min.js” was blocked due to its Cross-Origin-Resource-Policy header (or lack thereof). See https://developer.mozilla.org/docs/Web/HTTP/Cross-Origin_Resource_Policy_(CORP)# I've tried adding // @sandbox Javascript but get an error about sandbox not being valid userscript header(this is ESlint message though). this is the script I'm using. if (typeof(jQuery) == 'undefined') function loadScriptByURL(id, url, callback) { if (!isScriptExist) { if (isScriptExist && callback) callback(); |
I think this solution stopped working at some point. |
Although I had confirmed previously that it was working for me, at some point it started failing again, but I couldn't get enough info to add anything usefull. |
If you set "Modify existing content security policy (CSP) headers" to "Yes" in Firefox, the Content Security Policy will not work.
No problem with Chrome.
Thank you for your understanding.
The text was updated successfully, but these errors were encountered: