The `--disable-web-security` command is seems no longer working

狂风中的少年 提交于 2019-11-27 13:36:49

问题


The command --disable-web-security to allow for cross domain requests on Chrome is no longer working, I presume due to the latest update.

Is there a workaround for this, besides downloading an older version of chrome and disabling updates?

Might as well ask in the same question, the javascript snippet suggested to turn off web security in Firefox never works for me:

try {
    netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
} catch (e) {
    alert("UniversalBrowserRead failed");
}

The page always alerts UniversalBrowserRead failed.


回答1:


Kill all instances and try again. Had the same problem today and after I killed chrome it works.




回答2:


Open the task manager in your laptop or computer and try to kill all the existing chrome* instances in you system and run the shortcut with "\Google\Chrome\Application\chrome.exe --disable-web-security"

It always resets when you restart the laptop or computer so, you may need to do this step when you re-start the system.




回答3:


extend disable web security command with --user-data-dir. This worked for me, more details are on >https://bugs.chromium.org/p/chromium/issues/detail?id=575690

Command I use in windows :

"C:\Users\Public\Desktop\Google Chrome.lnk" --disable-web-security  --user-data-dir


来源:https://stackoverflow.com/questions/6918393/the-disable-web-security-command-is-seems-no-longer-working

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