Trying to retrofit our working chrome web extension to work in Firefox (Development Edition v50.0a2). When we run the existing extension, we’re met with this error:
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src moz-extension://60027548-2e95-43be-976a-1d67236b301a”).
Using a background HTML page specified in the manifest like so:
"background": {
"page": "background.html",
"persistent": false
},
This background page includes a handful of references to scripts included in the extension like so:
<script src="lib/jquery.min.js"></script>
<script src="tenants.js"></script>
<script src="background.js"></script>
<script src="another-script1.js"></script>
<script src="another-script2.js"></script>
Removing the one referencing jQuery allows the extension to be loaded without the error, so we’re currently assuming that is the issue. However, the extension currently relies on it to function properly.
The content_security_policy is specified like so:
“script-src ‘self’ ‘unsafe-eval’ blob: filesystem: chrome-extension-resource: moz-extension: https://127.0.0.1 https://127.0.0.1:44301 https://127.0.0.1:44302; object-src ‘self’ moz-extension: https://127.0.0.1 https://127.0.0.1:44301; child-src ‘self’ https://127.0.0.1:44301 https://127.0.0.1:44302; connect-src ‘self’ https://127.0.0.1:44301 https://127.0.0.1:44302;”
I’ve already attempted to remove the “chrome-extension-resource:” entry, since that’s Chrome-specific anyway.
Any ideas?