feat: jwt过期时间设置为1天
This commit is contained in:
parent
ef66c256af
commit
61b3b1f3e5
|
|
@ -8,11 +8,17 @@ import requests
|
|||
import os
|
||||
import re
|
||||
from flask_jwt_extended import JWTManager, create_access_token, jwt_required, get_jwt_identity
|
||||
from datetime import timedelta
|
||||
|
||||
app = Flask(__name__, static_folder='dist/assets', static_url_path='/assets')
|
||||
CORS(app)
|
||||
VUE_DIST_DIR = os.path.join(os.path.dirname(__file__), 'dist')
|
||||
app.config['JWT_SECRET_KEY'] = 'carbon'
|
||||
app.config.update(
|
||||
JWT_SECRET_KEY='carbon',
|
||||
JWT_ACCESS_TOKEN_EXPIRES=timedelta(days=1),
|
||||
JWT_REFRESH_TOKEN_EXPIRES=timedelta(days=30),
|
||||
JWT_ALGORITHM='HS256', # 签名算法
|
||||
)
|
||||
jwt = JWTManager(app)
|
||||
|
||||
LLM_URL = "http://106.0.4.200:9000/v1/chat/completions"
|
||||
|
|
|
|||
Loading…
Reference in New Issue