Welcome! Log In Create A New Profile

Advanced

Log and suppress proxy header

Posted by frostbyte 
Log and suppress proxy header
June 09, 2014 09:56AM
I'd like to log a header from a proxied (via X-Accel) server with $sent_http_<header> before suppressing it with proxy_hide_header <header>.

Both of these work alone but, as expected proxy_hide_header erases $sent_http_<header>.

Any pointers on how to make this work? I've tried various combinations of variables and sequences of directives without success.

Thanks,

Alex
Re: Log and suppress proxy header
June 17, 2014 08:59PM
One solution is to add a separate log_format directive including variables for the desired headers, put an access_log directive in the location and map the headers to the variables referenced in the log_format directive.

Alex
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 133
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready