Hy,
I've this error when I do a request ajax to another domain:
XMLHttpRequest cannot load http://rec.something.fr/services/data.
The 'Access-Control-Allow-Origin' header contains the invalid value '*.something.fr'.
Origin 'http://local.something.fr' is therefore not allowed access
I don't understand if the 'Access-Control-Allow-Origin' header can use or not a regexp expression. Some sources said it can, other said it cannot.
The big issue is that it's another society who is in charge of the http://rec.something.fr. Before I call them, I want to be sure that the issue is on their server, and not that's something on my code who is missing.
my code:(Origin = http://local.something.fr)
$.ajax({
url: "http://rec.something.fr/services/data",
crossDomain: true,
dataType: "json" })
the content of the called Services is a Json:
[{data:myData}]
If I use the CORS chrome plugin who catch the response and replace Access-Control-Allow-Origin: *.something.fr by Access-Control-Allow-Origin: *, It will work.
I cannot use JSONP because this would require updating the rec.something.fr server
Any Idea?