I have look at many similar issue on stack overflow & google but no suggested solutions has work for me yet.
Here's the situation:
I'm trying to connect to a private api by using the following request:
POST https://api.domain.com/oauth/token
I need to pass an Authorization & Content-Type headers as well.
Problem is that the pre-flight OPTIONS request doesn't show those two headers, which made the api return me a 401 error.
This has been tested in Firefox & Chrome.
If I try to use HTTP instead of HTTPS, it get automatically redirected to HTTPS.
What's weird with that is that the exact same route in Postman work. Postman add the Authorization header in the OPTIONS request so the problem is not on server side.
How can I make sure that Angular $http add the Authorization header just like Postman do?
Thanks