]> git.kaiwu.me - nginx.git/commit
Realip: port support in X-Real-IP and X-Forwarded-For.
authorDmitry Volyntsev <xeioex@nginx.com>
Mon, 23 May 2016 15:44:23 +0000 (18:44 +0300)
committerDmitry Volyntsev <xeioex@nginx.com>
Mon, 23 May 2016 15:44:23 +0000 (18:44 +0300)
commit06176bce918ea25bce8e4cc3adcc0e692bf1eac6
treec1d9c513f560eb0b78a2a9f9d7c6fa78f5174bfe
parent19140c8c4f7f16747df4a7e3bf4299a6a8d75a81
Realip: port support in X-Real-IP and X-Forwarded-For.

Now, the module extracts optional port which may accompany an
IP address.  This custom extension is introduced, among other
things, in order to facilitate logging of original client ports.
Addresses with ports are expected to be in the RFC 3986 format,
that is, with IPv6 addresses in square brackets.  E.g.,
"X-Real-IP: [2001:0db8::1]:12345" sets client port ($remote_port)
to 12345.
src/core/ngx_inet.c
src/core/ngx_inet.h
src/http/ngx_http_core_module.c