Canary --disable-web-security no longer works for ajax requests in AngularJS project

Running canary with --disable-web-security argument no longer helps to send cross domain AJAX requests when developing on localhost

I see a message in the console

XMLHttpRequest cannot load http://[some-domain-name].com. 
No 'Access-Control-Allow-Origin' header is present on the requested resource. 
Origin 'http://localhost:3100' is therefore not allowed access.

      

How to customize header for ajax request in AngularJS project?

P. S. I am using an alias to start the canary with the required arguments

alias canary="open -a \"Google Chrome Canary\" --args --disable-web-security"

      

+3


source to share


2 answers


EDIT

Working solution: use command open -a Google\ Chrome\ Canary --args --disable-web-security --user-data-dir=$HOME/profile-folder-name

.

Explanation: --disable-web-security

Now requires the use of a flag --user-data-dir

.

Windows command: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir=%USERPROFILE%\profile-folder-name




This looks like a bug only in Canary (works as expected in the latest stable Chrome). Chrome sees the flag and displays a warning, but doesn't allow cross domain requests. It worked a couple of days ago.

I reported the issue: https://code.google.com/p/chromium/issues/detail?id=575690

+11


source


Try closing your browser and reopening it with a custom argument.



Canary is updated frequently, and when you accept it for an update, it restarts with no special arguments.

0


source







All Articles