Overriding Access-Control-Allow-Origin restriction in Google Chrome
I make AJAX calls to URIs which belong to a different domain. Normally in IE I am able to do this via jQuery's CORS support. But this fails in Google Chrome irrespective where CORS support is set or not.
Now I get an error saying something like:
XMLHttpRequest cannot load . Origin
http://localhost:8000
is not allowed by Access-Control-Allow-Origin.
Is there a setting in Google Chrome which disables the Access-Control-Allow-Origin restriction?
There is a command-line switch which does the trick: --disable-web-security
Just call it like follows:
$ chromium-browser --disable-web-security http://localhost:8000/pages/index.html
Make sure the Chrome browser is fully closed, otherwise it will only launch a new instance and the applied option will not work.