跨域请求怎么携带cookie前端后台
前端$.ajax({url : ‘http://remote.domain.com/corsrequest’,data : data,dataType: ‘json’,type : ‘POST’,xhrFields: {withCredentials: true},crossDomain: true,contentType: “application/json”,})通过设置 withCredentials: true ,发送Ajax时,Request header中便会带上 Coo