How to run Chrome without CORS

In this article we are going to show how to run Chrome without CORS or better how to disable some Chrome security settings. This happens a lot if you are developing an app that is being executed on your development serve (i.e. your laptop) and is trying to reach some APIs hosted somewhere else.

CORS stays for Cross Origin Resource Sharing and it’s a security setting by the server. It means that the requests to that server must come from the same server that serve the application (more information here https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS).

You can easily achieve this by

Step 1:

Close all Google Chrome instances

Step 2:

Windows users can run this command from the command line

"C:\Program Files\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir="C:\Users\JohnCulloty\AppData\Local\Google\Chrome\User Data"  --disable-web-security  --user-data-dir=~/chromeTemp

For Mac users

open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security

Linux users

google-chrome --disable-web-security

If everything went well, you should be able to see a header similar to the image below

Google Chrome without CORS

Job done!

Please share and help us grow!

d3

d3 is an experienced Software Engineer/Developer/Architect/Thinker with a demonstrated history of working in the information technology and services industry. Really passionate about technology, programming languages and problem solving. He doesn't like too much the self celebration and prefers to use that time doing something useful ...i.e. coding

You may also like...

0 0 votes
Article Rating
3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Best Web Designer

Really plenty of awesome tips!

orlando web design agency

Really loads of beneficial data!