The problem is due to the lack of Access-Control-Allow-Headers from the request header. To fix this, we need to add Access-Control-Allow-Headers: * to request a header
Add Access-Control-Allow-Headers to the http request header . You can do this at the application level using $httpProvider . Add the line below to your application configuration section to add this header.
var app = angular.module("app", [ "ngRoute", "app.controllers", "app.directives", "app.filters" ]); app.config([ "$routeProvider", "$httpProvider", function($routeProvider, $httpProvider){ $httpProvider.defaults.headers.common['Access-Control-Allow-Headers'] = '*'; } ]);
source share