Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Keep remote port unchanged if real address doesn't contain a port.

January 20, 2020 09:28AM
On Mon, Jan 20, 2020 at 08:27:42PM +0800, Zexuan Luo wrote:
> # HG changeset patch
> # User spacewander <spacewanderlzx@gmail.com>
> # Date 1579523127 -28800
> # Mon Jan 20 20:25:27 2020 +0800
> # Branch ident
> # Node ID 86dbfc59e9c01608244c4fdc0d9a87fd9d330648
> # Parent 4fb5603514f2d324c50cb7e12c6ed0dc8935de0f
> Keep remote port unchanged if real address doesn't contain a port.
>
> Previously, when the request comes from a trusted address and it doesn't
> contain
> the port part, the $remote_port will be empty.
>
> This change has two advantages:
> 1. no need to write your own fallback with $remote_port and
> $realip_remote_port.
> 2. the $remote_port in the existent code doesn't need to be changed.

Preserving the port while changing the client address would be
misleading. Also, it's been the behavior before realip learned
how to change the client's port (1.11.0). Thus, it's believed
that the current behavior is correct.
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Keep remote port unchanged if real address doesn't contain a port.

Zexuan Luo 325 January 20, 2020 07:30AM

Re: [PATCH] Keep remote port unchanged if real address doesn't contain a port.

ru@nginx.com 233 January 20, 2020 09:28AM



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

Online Users

Guests: 47
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready