My Problem:
The browser does not allow the request to be sent because of the OPTIONS request failure.
The data sent with javascript and it looks like that:
var params = "grant_type=password&username=" + username + "&password=" + password;
$http({
url: '/Token',
method: "POST",
withCredentials: true,
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
data: params
})
This is how it looks like from the chrome console after the request:
Note
When i'm trying to post from fiddler the request is successfully succeed.
But if i'm trying to make an options request from fiddler it fails as the chrome does.
Any ideas?
Many providers do not allow this method as it could be used for malicious purposes.
To quote the spec:
I see many hackers probing servers looking for vulnerabilities with this option. I configure all our servers and client servers to return a 405 ERROR (method not allowed).