Home
Sign Up
Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
V2EX
›
程序员
求教 Refused to set unsafe header "Cookie" 如何解决
zengxiangjun
·
May 6, 2018
· 8675 views
This topic created in 2935 days ago, the information mentioned may be changed or developed.
在
a.site.com
跨域请求了
b.site.com
的接口(注意是二级域)
在发起的前端 ajax 请求中已经设置了 crossDomain 为 true, 并且 withCredentials 为 true
b.site.com
的接口正确返回了结果
但浏览器端依然报错:Refused to set unsafe header "Cookie"
环境:chrome。向各位大神求解
Unsafe
header
refused
set
1 replies
1
kfll
May 6, 2018 via iPhone
Ajax 不允许手动指定 Cookie Header,详见 MDN
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
5317 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 34ms ·
UTC 08:16
·
PVG 16:16
·
LAX 01:16
·
JFK 04:16
♥ Do have faith in what you're doing.
❯