This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Description
Even taking all the client side and server side issues of CORS into account I'm still not managing to make it work.
This works
$.ajax({
type:"GET",
url: "https://website.com/getProfile",
xhrFields: {
withCredentials: true
},
crossDomain: true
}).done(function ( data ) {
if( console && console.log ) {
console.log(data);
}
});
however this doesn't
$http.defaults.useXDomain = true;
$http({
method: "GET",
url: "https://website.com/getProfile",
withCredentials: true,
}).success(
function(data, status, headers, config) {
console.log(data);
}).error(function(data, status, headers, config) {
console.log(data);
});
The latter turns GET request into pending OPTIONS request. What am I missing? It can't be a bug can it?