Dmitry Makovetskiyd
Dmitry Makovetskiyd

Reputation: 7053

XMLHttpRequest : Not allowed by Access-Control-Allow-Origin

XMLHttpRequest cannot load http://example.mobi/. Origin http://www.example.mobi is not allowed by Access-Control-Allow-Origin.

How is it possible to have same origin error on two domains that are the same?

Upvotes: 0

Views: 995

Answers (1)

Baz1nga
Baz1nga

Reputation: 15579

note the url is different, www is considered a default subdomain under your app and when you request http://example.mobi it is assumed to be a different url.. You should use relative urls and let the browser query the right url..

hope that helps..

Upvotes: 1

Related Questions