Iam sending ajax request with jquery from domain1 to domain2.
here is code:
let settings = {
url: "https://domain2.com",
method: "POST",
headers: {
"Access-Control-Allow-Credentials": true,
"Access-Control-Allow-Origin": "https://domain1.com",
},
contentType: "application/json",
data: JSON.stringify(data),
xhrFields: {
withCredentials: true
}
};
jQuery.ajax(settings)
.then( res => {
// Do something with result
);
but after request when iam checking browser cookies the response cookies not there. iam also checked in network tab that domain2 sending the cookies.
anyone knows where is problem ?