jquery ajax 请求服务端 不传递cookie且服务端无法根据请求信息获取session的问题
原因是jQuery的Ajax请求里验证信息传递的配置没有开启
xhrFields: {withCredentials: true}
例如:
$.ajax({
url: '/login/enter',
xhrFields: {withCredentials: true},
data: {},
type: 'post',
dataType: 'json',
async...
原创
2018-09-07 18:25:24 ·
2328 阅读 ·
0 评论