]> git.kaiwu.me - nginx.git/commit
New function ngx_http_get_forwarded_addr() to look up real client address.
authorRuslan Ermilov <ru@nginx.com>
Mon, 14 May 2012 12:27:41 +0000 (12:27 +0000)
committerRuslan Ermilov <ru@nginx.com>
Mon, 14 May 2012 12:27:41 +0000 (12:27 +0000)
commit8e5dc474e5d848924c407c091199a97832bcd0ed
treeb0e6042776ab019037bae729ad894b5e78674764
parent4d5759e09841676dc745012f7e551e83e3b02fee
New function ngx_http_get_forwarded_addr() to look up real client address.

On input it takes an original address, string in the X-Forwarded-For format
and its length, list of trusted proxies, and a flag indicating to perform
the recursive search.  On output it returns NGX_OK and the "deepest" valid
address in a chain, or NGX_DECLINED.  It supports AF_INET and AF_INET6.
Additionally, original address and/or proxy may be specified as AF_UNIX.
src/http/ngx_http_core_module.c
src/http/ngx_http_core_module.h