这是一个创建于 2520 天前的主题,其中的信息可能已经有所发展或是发生改变。
- 在 a.site.com 跨域请求了 b.site.com 的接口(注意是二级域)
- 在发起的前端 ajax 请求中已经设置了 crossDomain 为 true, 并且 withCredentials 为 true
- b.site.com 的接口正确返回了结果
- 但浏览器端依然报错:Refused to set unsafe header "Cookie"
环境:chrome。向各位大神求解
 |
|
1
kfll 2018-05-06 15:59:22 +08:00 via iPhone
Ajax 不允许手动指定 Cookie Header,详见 MDN
|