I make ajax calls to URIs which belong to a different website domain. Normally in IE I am able to do this via jQuery cors support. But this fails in google chrome browser irrespective where cors support is set or not.

Now I get an error saying something like:

XMLHttpRequest cannot load <URI>. Origin http://localhost:8000 is not allowed by Access-Control-Allow-Origin.

Is there a setting in google chrome that can prevent the above error?

link|improve this question

53% accept rate
Do you have control over the remote web resource? You could add the Access-Control-Allow-Origin header there. – Jacob Krall Feb 1 at 20:18
feedback

1 Answer

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
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.