I am working on an API module that makes CORS requests to the service endpoint:
https://github.com/gigablox/angular-blitline-api
See the demonstration here:
http://plnkr.co/FjnJbHQHG5MM7P0VbtV6
You will notice when the API call is made I receive the following error message:
Request header field Content-Type is not allowed by Access-Control-Allow-Headers
I've open sourced a few of these API modules before for --- Imgur, Mandrill, and Blogger --- but this is the first time I've ever seen this problem using Blitline.
Is there an issue in my code or does the service provider not like the way the request is being sent to them because of some AngularJS $http
convention?
I was able to find a related topic however the solution provided did not work.
delete $httpProvider.defaults.headers.common['X-Requested-With'];
Feel free to try it with that plunker --- I should note I am using 1.1.5