From 5d6610bf0e3f50c890f15e4d4f840d4b561a947a Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 1 Nov 2023 15:53:20 +0800 Subject: [PATCH] bugfix --- ahserver/auth_api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ahserver/auth_api.py b/ahserver/auth_api.py index c31b86b..fa535a9 100755 --- a/ahserver/auth_api.py +++ b/ahserver/auth_api.py @@ -27,10 +27,10 @@ def get_client_ip(obj, request): class MyRedisStorage(RedisStorage): def key_gen(self, request): - uuid = request.headers.get('client_uuid') - if not uuid: + key = request.headers.get('client_uuid') + if not key: return uuid.uuid4().hex - b = uuid.encode('utf-8') + b = key.encode('utf-8') return binascii.hexlify(b) async def save_session(self, request: web.Request,