# HG changeset patch # User Igor Sysoev # Date 1171551876 0 # Node ID f1d7cf0f68e38781951da96d7a6d015e89e6784e # Parent 3dcc3041b5bc7bd081cfb29dd6d2eb7bef0d12b2 optimize $http_x_forwarded_for diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c --- a/src/http/ngx_http_variables.c +++ b/src/http/ngx_http_variables.c @@ -101,7 +101,7 @@ static ngx_http_variable_t ngx_http_cor offsetof(ngx_http_request_t, headers_in.via), 0, 0 }, #endif -#if (NGX_HTTP_PROXY) +#if (NGX_HTTP_PROXY || NGX_HTTP_REALIP) { ngx_string("http_x_forwarded_for"), NULL, ngx_http_variable_header, offsetof(ngx_http_request_t, headers_in.x_forwarded_for), 0, 0 }, #endif