Firefox extension - cdn access to the html page

I am looking to get access to jsdelivr cdn ( or any other cnd for that matter ) in the html page.
From the research I have done this is being done in the content_script and content_security_policy but no matter no matter what I have done I still get the following error

Content Security Policy: The page’s settings blocked the loading of a resource at (“script-src”).

here is my manifest and hopefully someone can point me in the right direction

      "background": {
        "scripts": ["background.js"],
        "page": "my-page.html"
      "content_scripts": [
          "matches": ["<all_urls>"],
          "js": [", https://*"]
      "browser_action": {
        "default_icon": "icons/page-32.png"
      "content_security_policy": "script-src 'self' https://*;  object-src 'self'",
      "permissions": [

You have to include all libraries within your extension.

1 Like

Also avoid using content_security_policy in your manifest unless you 100% sure you need it. Else your addon may get rejected by the reviewer.

extensions with ‘unsafe-eval’, ‘unsafe-inline’, remote script, blob, or remote sources in their CSP are not allowed for extensions listed on due to major security issues.


1 Like