Disable-web-security in Chrome 48+

2019-01-10 03:58发布

I have a problem with the --disable-web-security flag. It is not working in Chrome 48 and Chrome 49 beta on Windows.

I've tried killing all of the instances, reboot and run Chrome with the flag first of all, tried different machines as well. In the beta I can see the warning popup ("You are using unsupported flag.."), but CORS is still being enforced. Public version seems to ignore the flag completely.

There seems to be no news or people reports about that, so it might be a local issue. Will be grateful for help or any related info.

9条回答
Ridiculous、
2楼-- · 2019-01-10 04:22

It working for me. Try using this..it will help you out..

c:\Program Files\Google\Chrome\Application>chrome.exe --disable-web-security --user-data-dir="D:\chrome"

查看更多
Melony?
3楼-- · 2019-01-10 04:32

The version 49.0.2623.75 (64-bit) is not in beta anymore.

The command to fix the CORS issue is google-chrome-stable --disable-web-security --user-data-dir

查看更多
老娘就宠你
4楼-- · 2019-01-10 04:34

I'm seeing the same thing. A quick google found this question and a bug on the chromium forums. It seems that the --user-data-dir flag is now required. Edit to add user-data-dir guide

查看更多
ゆ 、 Hurt°
5楼-- · 2019-01-10 04:34

Mac OS:

open -a Google\ Chrome --args --disable-web-security --user-data-dir=""

UPD: add "" to --user-data-dir because newer chrome versions require it in order to work

查看更多
闹够了就滚
6楼-- · 2019-01-10 04:34

For Mac, using Safari is a good alternate option for local development purpose and the feature is built into the browser (so no need to add browser extension or launch Chrome using bash command like [open -a Google\ Chrome --args --disable-web-security --user-data-dir=""].

To disable cross origin restriction using Safari (v11+): From menu click “Develop > Disable Cross Origin Restriction”.

This does not require relaunching the browser and since its a toggle you can easily switch to secure mode.

查看更多
虎瘦雄心在
7楼-- · 2019-01-10 04:35

For Chrome Version 50+ for Mac Users. Close all opened chrome first and run the below command

open -a Google\ Chrome --args --disable-web-security --user-data-dir=""

The above will work. Thanks

查看更多
登录 后发表回答