Mercurial > hg > nginx
diff src/http/modules/ngx_http_realip_module.c @ 6565:3af0e65a461a
Realip: detect duplicate real_ip_header directive.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Mon, 23 May 2016 19:17:24 +0300 |
parents | 26feae43987f |
children | b3b7e33083ac |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_realip_module.c +++ b/src/http/modules/ngx_http_realip_module.c @@ -387,6 +387,10 @@ ngx_http_realip(ngx_conf_t *cf, ngx_comm ngx_str_t *value; + if (rlcf->type != NGX_CONF_UNSET_UINT) { + return "is duplicate"; + } + value = cf->args->elts; if (ngx_strcmp(value[1].data, "X-Real-IP") == 0) {