Bug 434896 - Hack for proxy pass through to get real client IP address
Hack for proxy pass through to get real client IP address
Status: CLOSED NEXTRELEASE
Product: Bugzilla
Classification: Community
Component: Bugzilla General (Show other bugs)
3.2
All Linux
low Severity low (vote)
: ---
: ---
Assigned To: PnT DevOps Devs
http://en.wikipedia.org/wiki/X-Forwar...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-25 23:13 EST by David Lawrence
Modified: 2013-06-23 22:27 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-02-25 23:23:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to pass through real client IP address when going through a proxy (967 bytes, patch)
2008-02-25 23:13 EST, David Lawrence
no flags Details | Diff

  None (edit)
Description David Lawrence 2008-02-25 23:13:27 EST
# HACK FOR PROXY PASS-THROUGH
# If client if one of the proxy servers then we try to use the
# HTTP_X_FORWARDED_FOR address as the client's real address
my %rx = (
    proxy_ip         => qr/^10\.8\.2\.15\d$/,
    last_ip_in_chain => qr/([^,\s]+)$/,
);
if (i_am_cgi() && $ENV{REMOTE_ADDR} =~ $rx{proxy_ip}) {
    $ENV{REMOTE_ADDR} = $ENV{HTTP_X_FORWARDED_FOR} =~ $rx{last_ip_in_chain}
}
Comment 1 David Lawrence 2008-02-25 23:13:27 EST
Created attachment 295869 [details]
Patch to pass through real client IP address when going through a proxy

Note You need to log in before you can comment on or make changes to this bug.