关于ajax请求头设置

今天同事说想改下host请求头,之前好像记得不能修改这个header,找了一下资源,记一下。下面这些请求头设置是不会生效的。

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" ];

想改的话也有办法,浏览器插件好像可以做到。记得有一个iheader插件。



请遵守《互联网环境法规》文明发言,欢迎讨论问题
扫码反馈

扫一扫,反馈当前页面

咨询反馈
扫码关注
返回顶部