fix;修复 cookie 获取参数

This commit is contained in:
lei_y601
2025-08-07 10:06:29 +08:00
committed by yujj128
parent 04a4026164
commit 8ce2c0571b
2 changed files with 4 additions and 1 deletions

2
.env
View File

@@ -40,4 +40,4 @@ DEFAULT_QUERY_SIZE = 30
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=xx
#REDIS_PASSWORD=xx

View File

@@ -235,6 +235,9 @@ def room_chat(request):
or request.headers.get('yht_access_token', None))
if yht_token:
params['yht_access_token'] = yht_token
if not yht_token:
ckk = request.COOKIES
params['yht_access_token'] = ckk.get('yht_access_token', None)
body = json.loads(request.body)
resp = process_chat(body, params)
return JsonResponse(resp)