From: Igor Sysoev Date: Thu, 15 Feb 2007 15:04:36 +0000 (+0000) Subject: optimize $http_x_forwarded_for X-Git-Tag: release-0.5.13~6 X-Git-Url: http://git.kaiwu.me/%7B@url%7D?a=commitdiff_plain;h=e8722b8b984117151317c034012f1c08a5213a61;p=nginx.git optimize $http_x_forwarded_for --- diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c index ac4a4a2f8..3ea0f96ae 100644 --- 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_core_variables[] = { 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