Cross Origin Chrome Extension

前端 未结 2 1038
悲哀的现实
悲哀的现实 2021-02-16 00:22

I have been reading and playing around with Chrome Extensions for the last week or so but I\'m having trouble trying to achieve what I want. What I am trying to create is an Ext

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-16 00:36

    You need to explicitly list all the URLs under permissions in manifest.js Trying to use anything which is not listed would cause a Cross origin error.

    you can list the url under permissions section and that should work.

    "permissions": [
            "webRequest",
            "storage",
            "https://mail.google.com/*",
            "http://myserver.com/*",
            "https://blah.blah.com/*"
        ],
    

    Hope that helps

提交回复
热议问题