前端

Ajax跨域携带cookie怎么操作?

添加以下属性即可携带跨域cookie

beforeSend: function (xhr) {
    xhr.withCredentials = true
},
crossDomain: true,
xhrFields: {
    withCredentials: true
},
crossDomain: true,


评论 0

还没有评论,来说两句吧。

验证码

登录后即可评论。评论需要填写验证码。