feat: add cookie sessions and backend role authorization

This commit is contained in:
2026-10-16 07:51:59 +08:00
parent 411eadb431
commit 3f25ffab83
28 changed files with 1186 additions and 31 deletions
+4
View File
@@ -3,3 +3,7 @@ APP_ENV=development
API_PREFIX=/api
DATABASE_URL=postgresql+psycopg://nalati:change-this-password@127.0.0.1:5432/nalati_rag
CORS_ORIGINS=http://localhost:5173,http://127.0.0.1:5173
AUTH_ALLOWED_ORIGINS=http://localhost:5173,http://127.0.0.1:5173,http://localhost:8000,http://127.0.0.1:8000
# 默认要求 HTTPS;仅本机 HTTP 联调可显式改为 false。
AUTH_COOKIE_SECURE=true
AUTH_SESSION_SECONDS=28800