前端必须要在ajax请求里加上xhrFields: {withCredentials: true}, crossDomain: true。
$.ajax({
url: xxx/xxx
// 将XHR对象的withCredentials设为true
xhrFields: {
withCredentials: true
},
crossDomain: true
});
前端必须要在ajax请求里加上xhrFields: {withCredentials: true}, crossDomain: true。
$.ajax({
url: xxx/xxx
// 将XHR对象的withCredentials设为true
xhrFields: {
withCredentials: true
},
crossDomain: true
});