nginx有时无法转发自定义header头内容的问题

您所在的位置:网站首页 nginx不转发请求头 nginx有时无法转发自定义header头内容的问题

nginx有时无法转发自定义header头内容的问题

2023-09-01 14:32| 来源: 网络整理| 查看: 265

原文地址:http://313968.blog.51cto.com/303968/895672

 

使用nginx做负载均衡或http代理时,碰到http header不转发的问题。

 

  配置里只有转发设置原始ip和host的             proxy_set_header Host $host;          proxy_set_header X-Real-IP $remote_addr;         proxy_set_header     X-Forwarded-Server $host;     但我自定义的header却都忽略掉了。百思不得其解:   1、理论上转发header是基本功能啊,apache都没问题 2、网上也搜不到此类问题说明 3、可能大家都不用客户端自定义提交header?     打开nginx的debug:   配置中: daemon off; error_log logs/error.log debug;   看error_log 发现解析header时出现:   2010/12/13 18:49:06 [info] 6248#1476: *1 client sent invalid header line: “wiz_api_version: 2″ while reading client request headers, client: 223.254.100.103, server: localhost, request: “POST /wizkm/a/upload HTTP/1.1″



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3