Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
6564:19db5a6bc34e | 6565:3af0e65a461a |
---|---|
385 { | 385 { |
386 ngx_http_realip_loc_conf_t *rlcf = conf; | 386 ngx_http_realip_loc_conf_t *rlcf = conf; |
387 | 387 |
388 ngx_str_t *value; | 388 ngx_str_t *value; |
389 | 389 |
390 if (rlcf->type != NGX_CONF_UNSET_UINT) { | |
391 return "is duplicate"; | |
392 } | |
393 | |
390 value = cf->args->elts; | 394 value = cf->args->elts; |
391 | 395 |
392 if (ngx_strcmp(value[1].data, "X-Real-IP") == 0) { | 396 if (ngx_strcmp(value[1].data, "X-Real-IP") == 0) { |
393 rlcf->type = NGX_HTTP_REALIP_XREALIP; | 397 rlcf->type = NGX_HTTP_REALIP_XREALIP; |
394 return NGX_CONF_OK; | 398 return NGX_CONF_OK; |