commit 15740538f780d527b5392334069db3e6a7c59515 parent 28fbf40aba1c63e49daf6e8bbc5eae081111702e Author: Sheng <webmaster0115@gmail.com> Date: Thu, 19 Sep 2019 09:09:21 +0800 Fix getting addr from an ipv6 context address Diffstat:
M | webssh/handler.py | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/webssh/handler.py b/webssh/handler.py @@ -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