When you’re proxying requests via nginx, you might assume after reading [the documentation][1] that every header is forwarded, except for the Host and Connection headers.

You’d also be wrong.

nginx drops all headers with an underscore in them.

This is a configurable settings. You can turn it on with a simple

underscores_in_headers on

I’m still baffled as to *why* this is [a configuration parameter][2]. And why it is turned off by default. And why there is no mention of it in the proxy docs.

Thanks to kolbyjack on #nginx for helping me figure this out.

[1]: http://wiki.nginx.org/HttpProxyModule" data-mce-href= [2]: http://wiki.nginx.org/HttpCoreModule#underscores_in_headers