首页 > 技术文章 > nginx 自动忽略request中header name包含下划线参数的解决方法

jaamy 2016-12-05 15:15 原文

使用nginx过程中遇到了个问题,就是request中的header name中如果包含下划线会自动忽略掉,导致服务器接收不到该字段的内容,以下为解决方法:

nginx默认request的header内容参数下划线时会自动忽略掉,需要添加以下配置到http中
underscores_in_headers on; #默认 underscores_in_headers 为off,表示如果header name中包含下划线,则忽略掉。

 

推荐阅读