I am developing a WebGL driven application and I want to launch chrome like this from the command line:
open -a Google\ Chrome --args --disable-web-security
I just don't want to have to type that in every single time. Is there a way to easily turn that into a one word command? I am using a mac if it matters.
The Easiest way to Launch Chrome with flags in MAC using terminal is :
'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' --disable-features=CrossSiteDocumentBlockingAlways,CrossSiteDocumentBlockingIfIsolating
Any filter can come after
--
in the above code--disable-features=CrossSiteDocumentBlockingAlways,CrossSiteDocumentBlockingIfIsolating
is just an example.Note: Make sure to close all instances of Chrome before running it.
This work for me:
cchrome
command open a new windows of chrome with the disable web security to solve the "access-control-allow-origin" problemJust make an alias in your .bashrc or .bash_profile
And then reload your shell.
Now, every time you type
ogc
(or whatever you want to call it) in your terminal, it will run the full commandopen -a Google\ Chrome --args --disable-web-security
Why not just run a webserver? Open a terminal and type
Now in your browser to go
http://localhost:8000
When your done go to the terminal and press Ctrl-CThat seems much better than disabling your security and risking getting pwnd.