I am consuming a REST API service with AngularJS and the POST method, when consuming the service, the following error is coming up:
XMLHttpRequest can not load https: // ..... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin link is therefore not allowed access.
I have already read and it is obviously a problem of CORS since when sending the request and the server answers, the Access-Control-Allow-Origin header must contain in this case my IP (or the ip of the angularjs application) or it must contain something like Access-Control-Allow-Origin="*"
.
Already check in the browser and effectively the answer sent to me by the server does not contain the Access-Control-Allow-Origin="*"
, as seen in the following image:
The obvious solution is to configure in the server where the REST services are the header Access-Control-Allow-Origin
but unfortunately this is a server from an external provider where it has not been easy to make the change.
I want to know if there is any way in AngularJS that allows me to solve this problem in the client and not continue waiting for me to make the change in the server.