Make sure cherrypy doesn't add the local port twice with http_proxy enabled
This commit is contained in:
@@ -195,7 +195,7 @@ def proxy(base=None, local='X-Forwarded-Host', remote='X-Forwarded-For',
|
|||||||
if not base:
|
if not base:
|
||||||
base = request.headers.get('Host', '127.0.0.1')
|
base = request.headers.get('Host', '127.0.0.1')
|
||||||
port = request.local.port
|
port = request.local.port
|
||||||
if port != 80:
|
if port != 80 and not base.endswith(':%s' % port):
|
||||||
base += ':%s' % port
|
base += ':%s' % port
|
||||||
|
|
||||||
if base.find("://") == -1:
|
if base.find("://") == -1:
|
||||||
|
Reference in New Issue
Block a user