Welcome! Log In Create A New Profile

Advanced

Re: Writing Header to Logfile

Liu Lantao
July 08, 2017 01:38PM
According to nginx document (http://nginx.org/en/docs/http/ngx_http_core_module.html#var_http_):

---
$http_name
arbitrary request header field; the last part of a variable name is the field name converted to lower case with dashes replaced by underscores
———

if the request header name is 'X-Custom-Header', then the variable name is ‘$http_x_custom_header’.



> On Jul 7, 2017, at 11:55 PM, mailinglisten@simonhoenscheid.de wrote:
>
> Hello List,
>
> I would like to log a header which is send with the incoming request into a custom log field. How can this be done?
>
> Kind Regards
> Simon
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Writing Header to Logfile

Anonymous User July 07, 2017 11:56AM

Re: Writing Header to Logfile

tokers July 08, 2017 01:34AM

Re: Writing Header to Logfile

Liu Lantao July 08, 2017 01:38PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 170
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