From 3bfae234414d4be90773836eb37000e74caa323d Mon Sep 17 00:00:00 2001 From: vapao Date: Wed, 29 Mar 2023 18:31:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DTOKEN=5FTTL=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=A0=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_api/libs/middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spug_api/libs/middleware.py b/spug_api/libs/middleware.py index aa412b2..1a3a614 100644 --- a/spug_api/libs/middleware.py +++ b/spug_api/libs/middleware.py @@ -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="验证失败,请重新登录")