How to disable same origin policy in Chrome extension?

柔情痞子 提交于 2019-12-19 04:09:20

问题


Maybe are there some settings to disable this in extension context. Since I'm developing an extension it should be my own responsibility to not shoot my own goal. It is very frustrating to fiddle with this security thing that is totally out of reason when developing browser extensions.

I don't want to make whole browser insecure by disabling it globally. just for the scripts that are set in "content_scripts" section in manifest.json


回答1:


Your manifest.json file should have the domain you're looking to use in the permissions:

"permissions": [
    "http://*.domain.com/"
]


来源:https://stackoverflow.com/questions/6051537/how-to-disable-same-origin-policy-in-chrome-extension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!