Trying to disable Chrome same origin policy

社会主义新天地 提交于 2019-11-27 13:46:46

You need to use both arguments. This is how I run it on my mac.

open -a Google\ Chrome --args --disable-web-security -–allow-file-access-from-files

This is how it should be for windows:

"C:\PathTo\Chrome.exe" –allow-file-access-from-files -disable-web-security

To disable chrome web security on mac use this command on terminal

$ /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir="/tmp/chrome_dev_session" --disable-web-security

if $ open -a Google\ Chrome --args --disable-web-security -–allow-file-access-from-files dosen't help

Helder Robalo

You should request through a HTTP protocol

Here's an answer quite simple to do it: https://stackoverflow.com/a/23118676/1585438

The anti-SOP paramters: --disable-web-security -–allow-file-access-from-files

To make the parameters effective, there must not be another instance of chrome running. If you have chrome running already and start a new instance with the anti-SOP parameters, it will have no effect.

When you close chrome, make sure that all instances are closed. This includes instances without GUI as well (task manager is your friend)!

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