Fix getting addr from an ipv6 context address

pull/104/head
Sheng 2019-09-19 09:09:21 +08:00
parent 28fbf40aba
commit 15740538f7
1 changed files with 2 additions and 2 deletions

View File

@ -257,9 +257,9 @@ class MixinHandler(object):
def get_client_addr(self):
if options.xheaders:
return self.get_real_client_addr() or self.context.address
return self.get_real_client_addr() or self.context.address[:2]
else:
return self.context.address
return self.context.address[:2]
def get_real_client_addr(self):
ip = self.request.remote_ip