diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2021-03-05 17:16:24 +0300 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2021-03-05 17:16:24 +0300 |
commit | 1fce224f01b5a9b503315bd24e99421e5ca5bd7c (patch) | |
tree | 60c1787f169da6478225da4666410484b404df85 /src/mail/ngx_mail_core_module.c | |
parent | 72dcd5141b32fccdcd241cc031972f51874ceb41 (diff) | |
download | nginx-1fce224f01b5a9b503315bd24e99421e5ca5bd7c.tar.gz nginx-1fce224f01b5a9b503315bd24e99421e5ca5bd7c.zip |
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.
Diffstat (limited to 'src/mail/ngx_mail_core_module.c')
-rw-r--r-- | src/mail/ngx_mail_core_module.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mail/ngx_mail_core_module.c b/src/mail/ngx_mail_core_module.c index e16d70238..408312423 100644 --- a/src/mail/ngx_mail_core_module.c +++ b/src/mail/ngx_mail_core_module.c @@ -548,6 +548,11 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) #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; |