details:   http://hg.nginx.org/nginx/rev/3af0e65a461a
branches:  
changeset: 6565:3af0e65a461a
user:      Ruslan Ermilov <r...@nginx.com>
date:      Mon May 23 19:17:24 2016 +0300
description:
Realip: detect duplicate real_ip_header directive.

diffstat:

 src/http/modules/ngx_http_realip_module.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 19db5a6bc34e -r 3af0e65a461a src/http/modules/ngx_http_realip_module.c
--- a/src/http/modules/ngx_http_realip_module.c Mon May 23 18:44:23 2016 +0300
+++ b/src/http/modules/ngx_http_realip_module.c Mon May 23 19:17:24 2016 +0300
@@ -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) {

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel

Reply via email to