I'm using Angularjs. When I set Cookie
header with xhr.setRequestHeader()
I get the following error on Chrome:
Refused to set unsafe header "Cookie"
However, the Cookie
is included into the request and successfully sent to server. I seem to have configured everything correctly to allow Cookie
header on server and client:
for server I have these:
Header add Access-Control-Allow-Credentials "true"
for client I specify these:
withCredentials
Why is this error?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…