实现了.env加载
This commit is contained in:
parent
2f1cf11d91
commit
bb314a2c6b
@ -15,8 +15,8 @@ DATABASE_CONFIG = {
|
|||||||
JWT_CONFIG = {
|
JWT_CONFIG = {
|
||||||
'secret_key': os.getenv('JWT_SECRET_KEY', 'your-secret-key'),
|
'secret_key': os.getenv('JWT_SECRET_KEY', 'your-secret-key'),
|
||||||
'algorithm': 'HS256',
|
'algorithm': 'HS256',
|
||||||
'access_token_expire': timedelta(minutes=int(os.getenv('JWT_ACCESS_EXPIRE_MINUTES', '30'))),
|
'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', '7')))
|
'refresh_token_expire': timedelta(days=int(os.getenv('JWT_REFRESH_EXPIRE_DAYS', '3')))
|
||||||
}
|
}
|
||||||
|
|
||||||
# 日志配置
|
# 日志配置
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
fastapi>=0.95.2
|
fastapi>=0.95.2
|
||||||
|
python-dotenv>=1.0.0
|
||||||
sqlalchemy>=2.0.15
|
sqlalchemy>=2.0.15
|
||||||
passlib>=1.7.4
|
passlib>=1.7.4
|
||||||
bcrypt>=4.0.1
|
bcrypt>=4.0.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user