Skip to content

Instantly share code, notes, and snippets.

@tobbbe
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tobbbe/3fd51f9537e645c73fb9 to your computer and use it in GitHub Desktop.
Save tobbbe/3fd51f9537e645c73fb9 to your computer and use it in GitHub Desktop.
chrome cors
1. download chrome canary (like chrome beta)
2. create a alias/.bat-file (if you want)
MAC:
open terminal and do:
~/.bash_profile
navigate to a new line and add:
alias corsdev=’open -n -a /Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --args --disable-web-security’
ctrl-o (saves the file)
enter
ctrl-x
restart the terminal
Now if you open terminal and type 'corsdev' it will open Chrome Canary with the disable-web-security-flag and you'll be able to do cross origin requests (cors)!
WINDOWS:
1. create a .txt-file with
2. add: cd "C:\Users\TE\AppData\Local\Google\Chrome SxS\Application" && start chrome.exe --disable-web-security
3. save and rename file with .bat-extension
4. now if you open the .bat-file it will open Chrome Canary with the disable-web-security-flag and you'll be able to do cross origin requests (cors)!
DONE
Nothing here to see..
// open -n -a /Applications/Google\ Chrome\ Canary.app/ --args --disable-web-security
// /Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --disable-web-security
// open -n -a /Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --args --disable-web-security
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment