Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Adds $orig_remote_addr in realip module

Maxim Dounin
June 06, 2015 08:50AM
Hello!

On Fri, Jun 05, 2015 at 10:18:52PM -0500, Jon Nalley wrote:

> # HG changeset patch
> # User Jon Nalley <code@bluebot.org>
> # Date 1433560679 18000
> # Fri Jun 05 22:17:59 2015 -0500
> # Node ID b7c07ccca1f9be7038379cfd1077fb5885b3f388
> # Parent 62869a9b2e7d1b2b698cb1ca67ad664b37171113
> Adds $orig_remote_addr in realip module.
>
> When the realip module sets $remote_addr, the connecting IP is
> no longer available for logging etc. This change preserves the
> connecting IP as $orig_remote_addr.

[...]

> +static ngx_int_t
> +ngx_http_realip_orig_remote_addr_variable(ngx_http_request_t *r,
> + ngx_http_variable_value_t *v, uintptr_t data)
> +{
> + ngx_http_realip_ctx_t *ctx;
> +
> + ctx = ngx_http_get_module_ctx(r, ngx_http_realip_module);

Ruslan already explained that this approach is wrong and won't
work.

http://mailman.nginx.org/pipermail/nginx-devel/2015-May/006965.html

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Adds $orig_remote_addr in realip module

Jon Nalley 751 June 05, 2015 11:16PM

Re: [PATCH] Adds $orig_remote_addr in realip module

Maxim Dounin 292 June 06, 2015 08:50AM

Re: [PATCH] Adds $orig_remote_addr in realip module

Jon Nalley 327 June 06, 2015 09:48AM

Re: [PATCH] Adds $orig_remote_addr in realip module

Maxim Dounin 293 June 07, 2015 08:34PM

Re: [PATCH] Adds $orig_remote_addr in realip module

Jon Nalley 319 June 08, 2015 12:42PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 139
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready