No 'Access-Control-Allow-Origin' header is present on the requested resource[...]
Solution :
During your test, you can do that :
- replace :
$http.post(url,params);
- by :
var config = {
method: 'POST',
data:params,
headers: {
'Content-Type': undefined
},
url=url
};$http(config);
- and define in your restful application :
"Access-Control-Allow-Origin": "*"
Source : http://forum.ionicframework.com/t/angularjs-post-request-cors-issue/10334
Other interesting sources :
http://juhap.iki.fi/webdev/cross-domain-http-with-python/
http://www.nczonline.net/blog/2010/05/25/cross-domain-ajax-with-cross-origin-resource-sharing/
http://stackoverflow.com/questions/12630231/how-do-cors-and-access-control-allow-headers-work
Aucun commentaire:
Enregistrer un commentaire