Skip to content

Instantly share code, notes, and snippets.

@codeshrew
Last active March 31, 2019 22:27
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save codeshrew/9260777 to your computer and use it in GitHub Desktop.
Save codeshrew/9260777 to your computer and use it in GitHub Desktop.
Launches Google Chrome with web security disabled. This disables the same origin policy for API calls and can ease development from a dev environment not in a server's CORS settings
(* Launches Google Chrome with web security disabled.
This disables the same origin policy for API calls and can
ease development from a dev environment not in a server's CORS settings *)
(* This same command can be sent to Canary by changing
'Google Chrome.app' to 'Google Chrome Canary.app' *)
do shell script "open -a 'Google Chrome.app' --args --disable-web-security --allow-running-insecure-content"
(* If you want to not use your current user in Chrome you can set --user-data-dir to point to /tmp
do shell script "do shell script "open -a 'Google Chrome.app' --args --disable-web-security --allow-running-insecure-content --new-window --user-data-dir=/tmp"" *)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment