Encountering an issue with a cross-domain ajax call in IE10 (in IE10 mode, not compatibility).
Situation:
Two domains involved, http://a
and http://b
. Cookie set for http://b
. Currently on page http://a
.
Goal is to make a CORS request to http://b
using XMLHttpRequest, including the cookie in the request.
JS code:
var xhr = new XMLHttpRequest();
xhr.open('GET', 'http://b', true);
xhr.withCredentials = true;
xhr.send();
Expected cookie attachment to request doesn't happen; Fiddler trace shows no cookie attached, resulting in 401: Access Denied
.
Server configured for CORS, includes Access-Control headers:
Access-Control-Allow-Origin: http://a
Access-Control-Allow-Credentials: true
Despite configuration, the issue persists in IE10 while the same code works in Firefox and Opera.