operations are inevitably required in the daily project development, while they often encounter similar no 'access-control-allow-origin 'header is present on the requested.
This error is generally caused by the fact that the cors authentication mechanism is set incorrectly.
Cors authentication mechanism requires client and server collaboration processing.
When the service isn't set up properly, the client wants to be able to disable the network security when the client wants to test it in advance.
How to disable network security? ( taking chrome as an example )
The most quick and convenient method is:
Copy chrome shortcuts to windows desktop. Rename this shortcut to cors, and edit the properties of the shortcut.
Add this to the target
--disable-web-security --user-data-dir="D:/Chrome" To the end of the target path.
Your goal should be that:
"C:Program Files (x86)GoogleChromeApplicationchrome.exe"--disable-web-security--user-data-dir="D:/Chrome"
After you've set up, click this shortcut to open the browser, and you can test the client and don't appear similar to no 'access-control-allow-origin 'header is present on the