fix: csrf_token

This commit is contained in:
DengDai
2025-11-24 16:32:34 +08:00
parent e656487d6d
commit 91a9be0868
6 changed files with 34 additions and 12 deletions

View File

@@ -10,7 +10,11 @@ class Config:
"""基础配置类"""
SECRET_KEY = os.environ.get('SECRET_KEY') or 'a-hard-to-guess-string'
SQLALCHEMY_TRACK_MODIFICATIONS = False
# CSRF 配置
WTF_CSRF_ENABLED = True
WTF_CSRF_TIME_LIMIT = None
# Session 配置
SESSION_TYPE = 'redis'
SESSION_PERMANENT = False