Fix traceback in x-forward-for in cases of localhost

This commit is contained in:
Griatch 2020-03-23 23:20:27 +01:00
parent ea802b4567
commit 6c1a77eecc

View file

@ -70,6 +70,7 @@ class HTTPChannelWithXForwardedFor(http.HTTPChannel):
Check to see if this is a reverse proxied connection.
"""
if self.requests:
CLIENT = 0
http.HTTPChannel.allHeadersReceived(self)
req = self.requests[-1]