How to disable same-origin policy of Chrome?如何禁止chrome同源策略

Due to the so called same-origin policy, browsers deny AJAX requests to service endpoints in case the domain/subdomain, protocol, or port differ from the app’s domain/subdomain, protocol, or port.

The browser refuses to connect to a remote URL directly for security reasons and we need a workaround:

In Google Chrome, you can easily disable same-origin policy of Chrome by running Chrome with the following command: 

[here-your-path-to-chrome-installation-dir]\chrome.exe --disable-web-security --user-data-dir.

Make sure that all instances of Chrome are closed before you run the command above. This will allow all web sites to break out of the same-origin policy and connect to the remote service directly.