When I add this header to my jQueryAjax request:
headers: {
"Authorization": "SomeValue"
}
on the server I add the Authorization header to the
h.Add("Access-Control-Allow-Headers","Authorization");
This works fine in other browsers but not in IE10!
ONE REMARK:
If I comment out the authentication header, refresh the page, issue a regular GET request to my web api which by default does not trigger a preflight request. After that request, I uncomment the custom header in my jquery request, save, refresh the page, issue a new request with a custom header, which then executes successfully !
In IE 10 web developer tools I can see an error message:
SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied
SEC7118: XMLHttpRequest for https://mywebapi.dev/api/authentication/cors/ required Cross Origin Resource Sharing (CORS). cors SEC7119: XMLHttpRequest for https://mywebapi.dev/api/authentication/cors/ required CORS preflight. cors SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied.
The request is aborted right away, it never reaches the message handler!