Opening chrome with disabled web security

April 19, 2024 · 1 min readLucian Ciobanu
Tags:CLIChrome

A project I'm working on needs to have chrome opened with disabled web security in order to communicate with the back end so I really want to have this comand line saved:

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

All of it is only on one line and obviously, it works for macs; For windows we have also in one line:

start chrome --user-data-dir="C://chrome-dev-disabled-security"
--disable-web-security --disable-site-isolation-traits

Hope this helped!

Cheers,
Lucian

Picture of author

Web Development & Software Delivery