Have you ever wanted to hit an api from a locally running client, except you kept running into CORS errors? Here's how to disable the CORS checks entirely on google chrome on a windows operating system to bypass that. Use at your own risk, as this does disable some browser security and isn't recommended for daily browsing.
Instructions for disabling CORS checks on Windows #
- Create or copy a google chrome shortcut on the desktop.
- Right click on the shortcut and go to properties.
- Modify the launch line adding these arguments to the command:
--disable-web-security --disable-features=IsolateOrigins,site-per-process --user-data-dir="C://ChromeDev"
The full command should look like"C:\ProgramFiles\Google\Chrome\Application\chrome.exe" --disable-web-security --disable-features=IsolateOrigins,site-per-process --user-data-dir="C://ChromeDev"
. - Use the shortcut to launch google chrome.
That's it! Similar instructions should work on other operating systems as well with the same google chrome launch arguments.