问题描述:在请求时往请求头header中放入了签名sign_val信息,在接收请求时再从header中拿出,在本地调试时是可以的,但通过NGINX代理之后发现拿不到。
nginx默认request的header的那么中包含’_’时,会自动忽略掉。
解决方法是:在nginx里的nginx.conf配置文件中的http部分中添加如下配置:
underscores_in_headers on; (默认 underscores_in_headers 为off)
问题描述:在请求时往请求头header中放入了签名sign_val信息,在接收请求时再从header中拿出,在本地调试时是可以的,但通过NGINX代理之后发现拿不到。
nginx默认request的header的那么中包含’_’时,会自动忽略掉。
解决方法是:在nginx里的nginx.conf配置文件中的http部分中添加如下配置:
underscores_in_headers on; (默认 underscores_in_headers 为off)