merging heads

This commit is contained in:
Nate Coraor
2009-01-09 14:08:38 -05:00
2 changed files with 6 additions and 1 deletions
@@ -62,6 +62,7 @@ class RemoteUser( object ):
# in the event of a lookup failure, deny access
host = None
if host in UCSC_SERVERS:
environ[ 'HTTP_REMOTE_USER' ] = 'ucsc_browser_display@example.org'
return self.app( environ, start_response )
# Apache sets REMOTE_USER to the string '(null)' when using the
# Rewrite* method for passing REMOTE_USER and a user is
@@ -14,4 +14,8 @@ class XForwardedHostMiddleware( object ):
if x_forwarded_for:
environ[ 'ORGINAL_REMOTE_ADDR' ] = environ[ 'REMOTE_ADDR' ]
environ[ 'REMOTE_ADDR' ] = x_forwarded_for
return self.app( environ, start_response )
x_url_scheme = environ.get( 'HTTP_X_URL_SCHEME', None )
if x_url_scheme:
environ[ 'original_wsgi.url_scheme' ] = environ[ 'wsgi.url_scheme' ]
environ[ 'wsgi.url_scheme' ] = x_url_scheme
return self.app( environ, start_response )