[ZCM] [ZC] 1732/ 4 Comment "Logging of client IP rather than the IP of the Proxy"
"Collector: Zope Bugs, Features, and Patches ..." <[email protected]> Wed, 23 May 2007 10:04:07 -0400
| Newsgroups | gmane.comp.web.zope.devel.collector-monitor |
|---|---|
| Message-ID | <[email protected]> |
Issue #1732 Update (Comment) "Logging of client IP rather than the IP of the Proxy" Status Pending, Zope/feature+solution medium To followup, visit: http://www.zope.org/Collectors/Zope/1732 ============================================================== = Comment - Entry #4 by ewindisch on May 23, 2007 10:03 am Uploaded: "2" - http://www.zope.org/Collectors/Zope/1732/2/view The prior patch would throw an exception if X-FORWARDED-FOR was not set. This would be a problem if medusa was contacted directly, rather than through the reverse proxy. This patch fixes that problem and has proven stable in production use. ________________________________________ = Comment - Entry #3 by efge on Mar 30, 2005 1:21 pm I'd be for including this if it was dependent on the trusted-proxy directive in zope.conf. ________________________________________ = Comment - Entry #2 by rjmunro on Mar 22, 2005 11:58 am I forgot to put that this is for zope version 2.7.4 & I can't seem to edit that field now. ________________________________________ = Request - Entry #1 by rjmunro on Mar 22, 2005 11:01 am Uploaded: "zope-proxy-log.patch" - http://www.zope.org/Collectors/Zope/1732/zope-proxy-log.patch/view The Z2.log file contains the IP addresses of the client accessing zope. Because 99% of the time, zope is deployed behind a reverse proxy, the Z2.log file normally logs the IP address of that proxy for all hits, rather then the IP address of the client. The attached patch makes it log the actual client address as given by the "x-forwarded-for" header that is added by the proxy. Note that in the case of the request going through several proxies, each proxy adds another address to the x-forwarded for header (comma separated), but this patch logs only the last one. ==============================================================