Mercurial > hg > nginx
diff src/mail/ngx_mail_core_module.c @ 7794:12ea1de7d87c
Mail: parsing of the PROXY protocol from clients.
Activated with the "proxy_protocol" parameter of the "listen" directive.
Obtained information is passed to the auth_http script in Proxy-Protocol-Addr,
Proxy-Protocol-Port, Proxy-Protocol-Server-Addr, and Proxy-Protocol-Server-Port
headers.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 05 Mar 2021 17:16:24 +0300 |
parents | 4f9b72a229c1 |
children | ec1071830799 |
line wrap: on
line diff
--- a/src/mail/ngx_mail_core_module.c Fri Mar 05 17:16:23 2021 +0300 +++ b/src/mail/ngx_mail_core_module.c Fri Mar 05 17:16:24 2021 +0300 @@ -548,6 +548,11 @@ #endif } + if (ngx_strcmp(value[i].data, "proxy_protocol") == 0) { + ls->proxy_protocol = 1; + continue; + } + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "the invalid \"%V\" parameter", &value[i]); return NGX_CONF_ERROR;