diff options
author | Sergey Kandaurov <pluknet@nginx.com> | 2022-06-22 18:34:58 +0400 |
---|---|---|
committer | Sergey Kandaurov <pluknet@nginx.com> | 2022-06-22 18:34:58 +0400 |
commit | c64e2ec1e94974193c286b63db4f58e6e499f5cb (patch) | |
tree | 144428623b095d53c37fbecd31b0026a321dfec6 /src/http/modules/ngx_http_realip_module.c | |
parent | 854e41fec24e1f292ec5a951e7bfc9377afc0905 (diff) | |
parent | 1009f5586ccf07375595675227d296815d91b2f2 (diff) | |
download | nginx-c64e2ec1e94974193c286b63db4f58e6e499f5cb.tar.gz nginx-c64e2ec1e94974193c286b63db4f58e6e499f5cb.zip |
Merged with the default branch.
Diffstat (limited to 'src/http/modules/ngx_http_realip_module.c')
-rw-r--r-- | src/http/modules/ngx_http_realip_module.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_realip_module.c b/src/http/modules/ngx_http_realip_module.c index 9586ebe07..f6731e780 100644 --- a/src/http/modules/ngx_http_realip_module.c +++ b/src/http/modules/ngx_http_realip_module.c @@ -134,9 +134,8 @@ ngx_http_realip_handler(ngx_http_request_t *r) ngx_str_t *value; ngx_uint_t i, hash; ngx_addr_t addr; - ngx_array_t *xfwd; ngx_list_part_t *part; - ngx_table_elt_t *header; + ngx_table_elt_t *header, *xfwd; ngx_connection_t *c; ngx_http_realip_ctx_t *ctx; ngx_http_realip_loc_conf_t *rlcf; @@ -168,9 +167,9 @@ ngx_http_realip_handler(ngx_http_request_t *r) case NGX_HTTP_REALIP_XFWD: - xfwd = &r->headers_in.x_forwarded_for; + xfwd = r->headers_in.x_forwarded_for; - if (xfwd->elts == NULL) { + if (xfwd == NULL) { return NGX_DECLINED; } |