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


当前回答

禁用此标志为chrome-chrome://flags/#reduced-引用者粒度它应该起作用

其他回答

尝试转到此页面并禁用网站域的域安全策略。

chrome://net-internals/#hsts

这是一个不断移动的目标。。。。今天我需要添加另一个标志以使其生效:--禁用站点隔离试验

操作系统X:open/Applications/Google\Chrome.app--args--用户数据dir=“/var/tmp/Chrome_dev_2”--禁用web安全--禁用站点隔离测试

使用当前最新的chrome版本103.0.5060.134(官方版本)(64位)

windows:单击开始按钮,然后复制粘贴以下内容(根据您的喜好更改D:\temp)。:

chrome.exe  --disable-site-isolation-trials --disable-web-security --user-data-dir="D:\temp"

Linux:启动终端,然后运行以下命令(根据需要更改~/tmp目录)

google-chrome --disable-site-isolation-trials --disable-web-security --user-data-dir="~/tmp"

注意:此解决方案将在独立的沙盒中启动chrome,并且不会影响主chrome配置文件。

在Windows 10上,以下功能将起作用。

<<path>>\chrome.exe --allow-file-access-from-files --allow-file-access --allow-cross-origin-auth-prompt

只有对于OSX Catalina,以下命令对我有效。

open-n-a/Applications/Google\Chrome.app/Contents/MacOS/Google\Chrome--args--用户数据dir=“/tmp/Chrome_dev_test”--禁用web安全