在调试接口的时候发现Jquery Ajax怎么修改headers的Cookie都无法生效,于是得到了这个答案
另外还有一些也无法修改,下面是不能修改的项目的数组
var forbiddenRequestHeaders = [
"accept-charset",
"accept-encoding",
"access-control-request-headers",
"access-control-request-method",
"connection",
"content-length",
"content-transfer-encoding",
"cookie",
"cookie2",
"date",
"expect",
"host",
"keep-alive",
"origin",
"referer",
"te",
"trailer",
"transfer-encoding",
"upgrade",
"via" ];