Welcome! Log In Create A New Profile

Advanced

How to write $upstream_trailer_{name} into access.log

Gena Makhomed
May 22, 2021 06:02PM
Здравствуйте, All!

Использую nginx/1.19.10 из официального репозитория nginx.org

На бэкенде в секции http прописал такие директивы:

add_trailer X-Response-Time $upstream_response_time always;
add_trailer X-Cache-Status $upstream_cache_status always;

На фронтенде в секции http прописал proxy_http_version 1.1;
Также на фронтенде в директиву log_format добавил переменные:

$upstream_trailer_x_response_time $upstream_trailer_x_cache_status

Ожидается что в лог будут записаны полученные значения этих переменных,
но вместо них в лог пишутся символы - - обозначающие пустые значения.

Почему так происходит? Это ошибка в nginx или я что-то делаю не так?

--
Best regards,
Gena

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

How to write $upstream_trailer_{name} into access.log

Gena Makhomed May 22, 2021 06:02PM

Re: How to write $upstream_trailer_{name} into access.log

Andrey Kopeyko May 22, 2021 06:26PM

Re: How to write $upstream_trailer_{name} into access.log

Gena Makhomed May 22, 2021 06:52PM

Re: How to write $upstream_trailer_{name} into access.log

Andrey Kopeyko May 22, 2021 08:58PM

Re: How to write $upstream_trailer_{name} into access.log

Andrey Kopeyko May 22, 2021 09:06PM

Re: How to write $upstream_trailer_{name} into access.log

Maxim Dounin May 23, 2021 09:20PM

Re: How to write $upstream_trailer_{name} into access.log

Илья Шипицин May 23, 2021 11:42PM

Re: How to write $upstream_trailer_{name} into access.log

Gena Makhomed May 25, 2021 04:08AM

Re: How to write $upstream_trailer_{name} into access.log

Maxim Dounin May 25, 2021 08:02AM

add_header

Gena Makhomed May 25, 2021 09:44AM

Re: add_header

Илья Шипицин May 25, 2021 09:54AM

Re: add_header

Maxim Dounin May 25, 2021 10:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 94
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready