Hello,
I’ve developped my api with jee (jax-rs 2.0 technologies) and want to consume it in ionic app.
Each time i’m using $http.get(url…) i always get an error about some CORS: > Blocage d’une requête multi-origines (Cross-Origin Request) : la politique « Same Origin » ne permet pas de consulter la ressource distante située sur http://myServerIp:8080/pdv/api/pdv. Raison : l’en-tête CORS « Access-Control-Allow-Origin » est manquant.
I read this tutorial and created a proxie like this in my ionic.project file:
“proxies”: [
{
“path”: “/api”,
“proxyUrl”: “http://myServerIp:8080/pdv/api”
}
]
but still the same error.
I even created a constant in app.js like this:
.constant(‘ApiEndpoint’, {
url: ‘http://myServerIp:8080/pdv/api’
});
but the error is still there.
Any solution for me ?