Log the headers sent by nginx to upstream server
maxozerov at i-free.com
Wed Aug 31 10:50:45 UTC 2016
"Log format can contain common variables, and variables that exist only at the time of a log write"
So, other options I do not see, except ngx_http_log_module
But, .. interesting thing is what it means to be overwritten?)
Nginx, some adjustments in request headers, receives from the client:
- Nginx gets rid of any empty headers.
- Ng.By default, will consider any header that contains underscores as invalid.
- The "Host" header is re-written to the value defined by the $proxy_host variable - (ex.: proxy_set_header Host $host;)
- The "Connection" header is changed to "close".
From: nginx [mailto:nginx-bounces at nginx.org] On Behalf Of Sushma
Sent: Wednesday, August 31, 2016 11:18 AM
To: nginx at nginx.org
Subject: Log the headers sent by nginx to upstream server
My client sends a request to nginx with a http header set.
This header is overwritten by nginx before passing along the reqest to the downstream server.
I want to log the header after modification by nginx.
I understand that we can log the header sent by client using "$http_<header_name>".
Is there some embedded variable or some other way I can use which will log the header sent to the downstream server?
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,269300,269300#msg-269300
nginx mailing list
nginx at nginx.org
More information about the nginx