axios网络请求里面跨域cookie的设置

axios数据请求默认的跨域cookie设置是false。

axios({
    method:'post',
    data:qs.stringify(data),
    url:'',
    withCredentials: true  // 设置为true即可
})
发布了270 篇原创文章 · 获赞 50 · 访问量 11万+

猜你喜欢

转载自blog.csdn.net/Miss_liangrm/article/details/104152067