gfrankliu at gmail.com
Fri Aug 14 16:51:14 UTC 2015
I have a few questions regarding headers in nginx:
1) I use proxy_set_header to pass a header to upstream servers. Is it
possible to honor the header if the incoming request already has it?
2) I want to pass the "Server" header from upstream response to clients,
and if there is no such response header, I'd like to add a customer one. Is
it possible via core nginx or any third party modules? Currently I am using
"proxy_pass_header Server" without any check. I am not sure what happens if
upstream response doesn't have it.
3) I am trying to log an upstream response header to access log but it has
a "dot" in it (say X.header). I don't have any control to the upstream
servers. On nginx side, I tried setting "ignore_invalid_headers off" in the
server block, and in the logformat, I tried a few things for the the
column: $upstream_http_x.header $upstream_http_x_header
$upstream_http_x-header, but nothing works. Any ideas how I can log it?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx