Error: Content Security Policy: The page’s settings blocked the loading of a resource

后端 未结 1 1331
离开以前
离开以前 2021-01-06 06:24

I\'ve been trying to move a simple program I made in jQuery/HTML to a Firefox WebExtension for easy deployment. The error I am getting is:



        
1条回答
  •  萌比男神i
    2021-01-06 06:48

    By default, extensions cannot load scripts, or other object resources, from the Internet. All CSS and JavaScript content used by your extension should be part of the extension package.

    (This documentation is from Chrome, but the exact same policies apply to Firefox WebExtensions.)

    It's possible to relax these restrictions somewhat, but this should generally be avoided -- loading resources from a remote server will make your extension fail to work properly if the user does not have Internet access, or if they are behind a restrictive firewall. Additionally, addons.mozilla.org will not accept addons which execute remotely hosted Javascript.

    0 讨论(0)
提交回复
热议问题