feat: implement session timeout countdown and UI optimization

This commit is contained in:
leeyj
2026-04-20 16:47:47 +09:00
parent ac58e14c8c
commit b376eedc48
15 changed files with 321 additions and 18 deletions
+7 -1
View File
@@ -88,11 +88,17 @@ def create_app():
init_db()
# Session and Security configurations
# config.json에서 타임아웃 로드 (기본 60분, 최소 10분 강제)
session_timeout = cfg.get('session_timeout', 60)
if not isinstance(session_timeout, int) or session_timeout < 10:
session_timeout = 10
from datetime import timedelta
app.config.update(
SESSION_COOKIE_HTTPONLY=True,
SESSION_COOKIE_SAMESITE='Lax',
SESSION_COOKIE_SECURE=os.getenv('SESSION_COOKIE_SECURE', 'False').lower() == 'true',
PERMANENT_SESSION_LIFETIME=3600 # 60 minutes (1 hour) session
PERMANENT_SESSION_LIFETIME=timedelta(minutes=session_timeout)
)
@app.after_request