修复TOKEN_TTL更新无效的问题

pull/605/head
vapao 2023-03-29 18:31:40 +08:00
parent 7902a8727c
commit 3bfae23441
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class AuthenticationMiddleware(MiddlewareMixin):
if user and user.token_expired >= time.time() and user.is_active:
if x_real_ip == user.last_ip or AppSetting.get_default('bind_ip') is False:
request.user = user
user.token_expired = time.time() + 8 * 60 * 60
user.token_expired = time.time() + settings.TOKEN_TTL
user.save()
return None
response = json_response(error="验证失败,请重新登录")