]> git.kaiwu.me - nginx.git/commit
geo: chains of trusted proxies and partial IPv6 support.
authorRuslan Ermilov <ru@nginx.com>
Mon, 14 May 2012 13:53:22 +0000 (13:53 +0000)
committerRuslan Ermilov <ru@nginx.com>
Mon, 14 May 2012 13:53:22 +0000 (13:53 +0000)
commit69521ddebf3562751ffd792b3eb4f356ae6d8ed6
tree5b03616fea35ecaae0c2c156ab9040b1e22e7284
parent11a8e26d29d6f6837f4c365766ebb2ec94efc428
geo: chains of trusted proxies and partial IPv6 support.

The module now supports recursive search of client address through
the chain of trusted proxies, controlled by the "proxy_recursive"
directive in the "geo" block.  It also gets partial IPv6 support:
now proxies may be specified with IPv6 addresses.

Example:
    geo $test {
        ...
        proxy 127.0.0.1;
        proxy ::1;
        proxy_recursive;
    }

There's also a slight change in behavior.  When original client
address (as specified by the "geo" directive) is one of the
trusted proxies, and the value of the X-Forwarded-For request
header cannot not be parsed as a valid address, an original client
address will be used for lookup.  Previously, 255.255.255.255 was
used in this case.
src/http/modules/ngx_http_geo_module.c