From bb314a2c6bec5946352f86046e29bc244e150783 Mon Sep 17 00:00:00 2001 From: carry <2641257231@qq.com> Date: Wed, 22 Jan 2025 13:48:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E4=BA=86.env=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.py | 4 ++-- requirements.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index 10e3097..26c2986 100644 --- a/config.py +++ b/config.py @@ -15,8 +15,8 @@ DATABASE_CONFIG = { JWT_CONFIG = { 'secret_key': os.getenv('JWT_SECRET_KEY', 'your-secret-key'), 'algorithm': 'HS256', - 'access_token_expire': timedelta(minutes=int(os.getenv('JWT_ACCESS_EXPIRE_MINUTES', '30'))), - 'refresh_token_expire': timedelta(days=int(os.getenv('JWT_REFRESH_EXPIRE_DAYS', '7'))) + 'access_token_expire': timedelta(minutes=int(os.getenv('JWT_ACCESS_EXPIRE_MINUTES', '10'))), + 'refresh_token_expire': timedelta(days=int(os.getenv('JWT_REFRESH_EXPIRE_DAYS', '3'))) } # 日志配置 diff --git a/requirements.txt b/requirements.txt index f333860..acec49f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ fastapi>=0.95.2 +python-dotenv>=1.0.0 sqlalchemy>=2.0.15 passlib>=1.7.4 bcrypt>=4.0.1