Hi LJ,
If you're not in control of the API server, then you will need to proxy the requests through your server in order to work around the CORS issue, as you have done. However, that puts unnecessary strain on your server.
The API server should return the appropriate headers so that the browser does not block the request. Maybe you should reach out to the other party to see why they haven't implemented CORS policies correctly. You might also want to check that the OPTIONS requests (these are sent by the browser to get the CORS policies before your request) are making it through - firewalls and proxies can block these unintentionally.
-Luke
--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.