Original link: https://blog.kelu.org/tech/2023/05/22/chrome-cors-issue.html
This problem is most likely to be encountered in the development environment chrome: blocked by CORS policy
The easiest solution is to switch to Firefox.
If you must use Chrome, you can use the following methods to turn off CORS detection:
Windows
Copy a shortcut of the chrome browser, find the opening path in the properties, and add after …chrome.exe
--args --disable-web-security --user-data-dir="C:/ChromeDevSession"
Mac
Execute command in terminal
open -a 'Google Chrome' --args --disable-web-security --user-data-dir=/tmp/chrome_dev_test
How to extend the program
This article is transferred from: https://blog.kelu.org/tech/2023/05/22/chrome-cors-issue.html
This site is only for collection, and the copyright belongs to the original author.