How-to: disable the web-security-check in Chrome for Mac

When I try to test one web app in coperate intranet, there is always some error like "Failed to load resource: Origin http://localhost:60923 is not allowed by Access-Control-Allow-Origin." And it can be solved via add the response header with "Access-Control-Allow-Origin:*" from server side.

But if you have no access to the web server, you can set your client browser to bypass Web Security checks. 

And on a Windows PC you can copy the Chrome shortcut and add in the launch properties with "-disable-web-security". Or use command to run "Chrome.exe --disable-web-security".

But on Mac you can not copy the exe and only way is to launch it via command line. The right way to launch it is: open -a Google Chrome --args --disable-web-security

(End)

原文地址:https://www.cnblogs.com/rabbitzhang/p/3201111.html