AngularJS transforms my POST request into OPTIONS when I add Authorization header:
$http({
url: ApiEndpoint + 'logout',
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': UserService.getApiKey()
}
})
I'm developpling a hybrid mobile application with Ionic that I test in browser, os it's a CORS request.
I have already seen this question. The proposed workaround is to change Content-Type that I did and it worked without Authorization. With Authorization header the request is changed again to OPTIONS method.
Can you propose client solution please because a have no control over server API.
Thank you.