有没有办法在谷歌的Chrome浏览器上禁用同源策略?


当前回答

Chrome的Allow Control Allow Origin插件不起作用。这是针对MacOS的

我将别名chrome='open-n-a/Applications/Google\chrome.app/Contents/MacOS/Google\Chrme--args-user data dir--disable web security'作为别名添加到我的.profile中。

其他命令将禁用我的其他扩展,这将在禁用cors的情况下启动正常的chrome

其他回答

对于使用**Chrome版本60.0.3112.78(解决方案测试和工作的当天)的windows用户,至少到今天为止是2022年11月24日(版本106.05.249.119(官方版本)(64位))。您不需要关闭任何chrome实例。

在桌面上创建快捷方式右键单击快捷方式,然后单击“财产”编辑Target属性将其设置为“C:\Program Files(x86)\Google\Chrome\Application\Chrome.exe”--禁用web安全--用户数据dir=“C:\ChromeDevSession”启动chrome并忽略消息:禁用网络安全不受支持!

注意不要使用这个特定的浏览器实例进行浏览,因为你可能会被黑客入侵!

在Windows PC上,使用较旧版本的Chrome,该命令将适用于所有人。我把我的Chrome降到了26版,而且效果不错。

Chrome的Allow Control Allow Origin插件不起作用。这是针对MacOS的

我将别名chrome='open-n-a/Applications/Google\chrome.app/Contents/MacOS/Google\Chrme--args-user data dir--disable web security'作为别名添加到我的.profile中。

其他命令将禁用我的其他扩展,这将在禁用cors的情况下启动正常的chrome

根据奥拉·卡尔森的回答,最好的方法是在不同的会话中打开不安全的Chrome。这样,您就不必担心关闭所有当前打开的选项卡,也可以使用原始的Chrome会话继续安全地上网。

这些批处理文件应该只适用于Windows。

将其放在Chrome_CORS.bat文件中以便于使用

start "" "c:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir="c:/_chrome_dev" --disable-web-security

这张是给Chrome Canary的。金丝雀_ CORS.bat

start "" "c:\Users\%USERNAME%\AppData\Local\Google\Chrome SxS\Application\chrome.exe" --user-data-dir="c:/_canary_dev" --disable-web-security

你可以使用这个名为“允许控制允许来源:*”的chrome插件。。。这使它变得非常简单,而且工作得非常好。在此处检查:*