tobbbe
8/20/2014 - 12:29 PM

chrome cors

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