forward or forwarded

main
Bob Mottram 2021-06-09 17:35:22 +01:00
parent bb3847481f
commit ec61f16d2e
1 changed files with 2 additions and 0 deletions

View File

@ -1441,6 +1441,8 @@ class PubServer(BaseHTTPRequestHandler):
createBasicAuthHeader(loginNickname, loginPassword)
if self.headers.get('X-Forward-For'):
ipAddress = self.headers['X-Forward-For']
elif self.headers.get('X-Forwarded-For'):
ipAddress = self.headers['X-Forwarded-For']
else:
ipAddress = self.client_address[0]
if not domain.endswith('.onion'):