i'm trying to do a login service to my app but something went wrong. Here is my $http:
$http({
method:"get",
url: ## BLAH BLAH BLAH,
headers: {
'Authorization': 'Basic ' + $base64.encode(loginData.usuario + ':' + loginData.senha)
}
}).then(function success(response){
## BLAH BLAH BLAH
}, function error(response){
## BLAH BLAH BLAH
});
When i run that $http it show a error on console:
XMLHttpRequest cannot load ## BLAH BLAH BLAH.
Request header field Authorization is not allowed by Access-Control-Allow-Headers in preflight response.
What i'm doing wrong? Sincerely, Lucas.