bugfix
This commit is contained in:
parent
5d6610bf0e
commit
578cc3be08
@ -29,9 +29,13 @@ class MyRedisStorage(RedisStorage):
|
|||||||
def key_gen(self, request):
|
def key_gen(self, request):
|
||||||
key = request.headers.get('client_uuid')
|
key = request.headers.get('client_uuid')
|
||||||
if not key:
|
if not key:
|
||||||
return uuid.uuid4().hex
|
key = uuid.uuid4().hex
|
||||||
b = key.encode('utf-8')
|
return key
|
||||||
return binascii.hexlify(b)
|
if isinstance(key, str):
|
||||||
|
key = key.encode('utf-8')
|
||||||
|
key = binascii.hexlify(key)
|
||||||
|
key = key.decode('utf-8')
|
||||||
|
return key
|
||||||
|
|
||||||
async def save_session(self, request: web.Request,
|
async def save_session(self, request: web.Request,
|
||||||
response: web.StreamResponse,
|
response: web.StreamResponse,
|
||||||
|
Loading…
Reference in New Issue
Block a user