扫码关注官方订阅号
跨域ajax请求(delete请求)写入cookie,后台服务端已配置,前端也已加过withCredentials:true,post和get请求都已写入cookie,但是delete和put请求没有写入cookie,报跨域错误。
学习是最好的投资!
cookie无法跨域
需要对 ajax 设置 withCredentials 参数才能带 cookie
$.ajax({ url: a_cross_domain_url, xhrFields: { withCredentials: true } });
http://devdocs.io/jquery/jque...
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
cookie无法跨域
需要对 ajax 设置 withCredentials 参数才能带 cookie
http://devdocs.io/jquery/jque...