How to run Chrome without CORS

Views: 12
0 0
Read Time:1 Minute, 4 Second

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!

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %
Previous post Learning PHP – Lesson 6 – Define PHP Functions
Next post Docker: Got permission denied while trying to connect to the Docker
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x