Bug 434897 - 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)
2.18
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:16 EST by David Lawrence
Modified: 2013-06-23 22:15 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:37 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 (863 bytes, patch)
2008-02-25 23:16 EST, David Lawrence
no flags Details | Diff

  None (edit)
Description David Lawrence 2008-02-25 23:16:31 EST
# HACK FOR PROXY PASS-THROUGH
# First check for SERVER_SOFTWARE because it's required to be
# defined for all requests in the CGI spec
# Then if client is one of the proxy servers then we try to use the
# HTTP_X_FORWARDED_FOR address as the client's real IP address
if ( exists $ENV{SERVER_SOFTWARE} and $ENV{REMOTE_ADDR} =~ /^10\.8\.2\.15\d$/ ) {
    $ENV{REMOTE_ADDR} = $ENV{HTTP_X_FORWARDED_FOR} =~ /([^,\s]+)$/;
}
Comment 1 David Lawrence 2008-02-25 23:16:31 EST
Created attachment 295870 [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.