今天碰到,使用nginx做负载均衡,http header自定义的参数不转发的问题。
发现带下划线的的自定义参数,不能转发,
soule下确实有这个情况:
原来默认 underscores_in_headers 为off.
syntax: underscores_in_headers on | off;default: underscores_in_headers off;context: http, server
Enables or disables the use of underscores in client request header fields. When disabled, request header fields whose names contain underscores are marked as invalid and are subject to the directive.
syntax: ignore_invalid_headers on | off;default: ignore_invalid_headers on;context: http, serverControls whether header fields with invalid names should be ignored. Valid names are composed of English letters, digits, hyphens, and possibly underscores (as controlled by the directive).