Conquer CORS with Undefeated Chrome

Undefeated Chrome

When you work on your localhost you need access different domain or API endpoints. However, this might cause an error, because some domains have restrictions to access different domains (not allowed or blocked), which we know as CORS issue. Thus, you are unable to work with that endpoint.

All we need is to bypass the domain/endpoint. You can bypass with an available plugin at Chrome store, but there are cons, those plugins are not power full enough to bypass CORS, sometimes we still got encounter issue, even we already set plugin on.

Then the solution comes from browser itself, by disabling all security flags, then you are able to work with different domain (blocked domain).

To run browser without security flag off:

Windows
Window + R, then type:

chrome.exe --user-data-dir="C://Chrome dev session" --disable-web-security

Mac
At terminal, type:

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

Linux
At terminal, type:

google-chrome --disable-web-security