Perhaps this is a common problem that may be available on the Internet, but what I got is here.
Adding a custom header to an HTTP request using angular.js
So, I went after him and changed the code to
Header setting
var config = {headers: { 'Authorization': 'XXXYYY token="xxxxxxxx", realm="dash-api"', "X-Testing" : "testing" } };
Request for a request:
return $http.get(api.host+'/agn/12/adv/1860/cam?status=1', config).then(function (response) { return { status:"success", data:response.data.data.active }; }, function (error) { return { status:"error", data:error } });
As you can see, the request is executed in methods of the OPTIONS type, and the Authorization token is not set in the request.
Please help me in this matter as I am struggling with two days.
Thank you very much.

source share