diff options
| author | Ruslan Ermilov <ru@nginx.com> | 2016-05-23 19:17:24 +0300 |
|---|---|---|
| committer | Ruslan Ermilov <ru@nginx.com> | 2016-05-23 19:17:24 +0300 |
| commit | adfd0b065cca23d2ca61ad43c5b8fdaa23957da9 (patch) | |
| tree | d38d5a58d5ec8c38d9879b9ee25e7e4eb84fb8bd /src | |
| parent | 06176bce918ea25bce8e4cc3adcc0e692bf1eac6 (diff) | |
| download | nginx-adfd0b065cca23d2ca61ad43c5b8fdaa23957da9.tar.gz nginx-adfd0b065cca23d2ca61ad43c5b8fdaa23957da9.tar.bz2 | |
Realip: detect duplicate real_ip_header directive.
Diffstat (limited to 'src')
| -rw-r--r-- | src/http/modules/ngx_http_realip_module.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_realip_module.c b/src/http/modules/ngx_http_realip_module.c index cfaa4c978..fca81eb26 100644 --- 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_command_t *cmd, void *conf) 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) { |
