From 3f96c9c6502243b06efd4bb34a189e72e3a5557c Mon Sep 17 00:00:00 2001
From: yearning <10538594+wangweifeng1999@user.noreply.gitee.com>
Date: 星期一, 28 九月 2026 19:24:55 +0800
Subject: [PATCH] 复制项目

---
 backend/app/config.py |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/backend/app/config.py b/backend/app/config.py
new file mode 100644
index 0000000..78b72e9
--- /dev/null
+++ b/backend/app/config.py
@@ -0,0 +1,26 @@
+from pathlib import Path
+
+from pydantic_settings import BaseSettings
+
+ROOT = Path(__file__).resolve().parents[2]
+
+
+class Settings(BaseSettings):
+    database_url: str = f"sqlite:///{ROOT / 'backend' / 'data' / 'app.db'}"
+    jwt_secret: str = "score-query-dev-secret-change-in-prod"
+    jwt_algorithm: str = "HS256"
+    jwt_expire_hours: int = 24
+    login_max_failures: int = 5
+    login_lock_minutes: int = 15
+    # 閫楀彿鍒嗛殧锛涘彲閫氳繃鐜鍙橀噺 CORS_ORIGINS 瑕嗙洊
+    cors_origins: str = (
+        "http://localhost:5174,"
+        "http://127.0.0.1:5174,"
+        "http://localhost:5175,"
+        "http://127.0.0.1:5175,"
+        "http://grader.gps120.com,"
+        "https://grader.gps120.com"
+    )
+
+
+settings = Settings()

--
Gitblit v1.8.0