如何在Chrome扩展中禁用相同的原产地政策? [英] How to disable same origin policy in Chrome extension?

查看:158
本文介绍了如何在Chrome扩展中禁用相同的原产地政策?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许有一些设置在扩展上下文中禁用此设置。由于我正在开发一个扩展,所以我自己有责任不要拍我自己的目标。在开发浏览器扩展时,摆脱这种完全不合理的安全性是非常令人沮丧的。



我不想让整个浏览器在全局禁用时不安全。只适用于在manifest.json的content_scripts部分设置的脚本。 您的清单。

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


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

解决方案

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

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

这篇关于如何在Chrome扩展中禁用相同的原产地政策?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆