Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Adds $orig_remote_addr in realip module

Valentin V. Bartenev
June 26, 2015 09:24AM
On Thursday 25 June 2015 14:51:15 Jon Nalley wrote:
> # HG changeset patch
> # User Jon Nalley <code@bluebot.org>
> # Date 1435261685 18000
> # Thu Jun 25 14:48:05 2015 -0500
> # Node ID 894a268769bf9b3c806a9506ea1e8daf2dac3841
> # Parent 6345822f0abb70807f635989b6c2df7852a55bd9
> 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.
>
> diff -r 6345822f0abb -r 894a268769bf src/core/ngx_connection.h
> --- a/src/core/ngx_connection.h Thu Jun 25 12:36:52 2015 +0300
> +++ b/src/core/ngx_connection.h Thu Jun 25 14:48:05 2015 -0500
> @@ -145,6 +145,10 @@
> socklen_t socklen;
> ngx_str_t addr_text;
>
> +#if (NGX_HTTP_REALIP)
> + ngx_str_t orig_addr_text;
> +#endif
> +
> ngx_str_t proxy_protocol_addr;
>

The realip module works on a per request basis, so storing this
information inside the connection structure looks wrong to me.

wbr, Valentin V. Bartenev

_______________________________________________
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 725 June 25, 2015 03:48PM

Re: [PATCH] Adds $orig_remote_addr in realip module

Valentin V. Bartenev 357 June 26, 2015 09:24AM



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

Online Users

Guests: 196
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