Browser cross-domain and security access issues

Note: Open Chrome needs to be closed. Otherwise, there will be no effect!

Windows system
chrome browser:
1. Create a shortcut of Chrome, and the target of modifying the shortcut is:
"C:\Program Files\Google\Chrome\Application\chrome.exe" --args --disable-web-security

2. Double-click the Chrome shortcut we created to open Chrome. As shown in the figure, "You are using an unsupported command line flag: --disable-web-security. Stability and security will be degraded", indicating that you cancel With cross-domain restrictions, you can call data across domains at will.
Safari browser:
C:\Program Files\Safari\Safari.exe --disable-web-security 


Mac os system
chrome browser:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security

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

Safari browser:
open -a '/Applications/Safari.app' --args --disable-web-security


Linux system:
chromium-browser --disable-web-security



Use the chrome command line: disable-web-security to implement browser cross-domain. Note that this method cannot be used after the chrome 48 version.
A new method is recommended to implement local cross-domain debugging of online resources, search for the chrome plugin Allow-Control-Allow-Origin: *.
https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326528206&siteId=291194637