mirror of
https://github.com/snailyp/gemini-balance.git
synced 2026-09-08 01:06:37 +08:00
feat: 更新文档、数据库配置和认证流程
- 重构 README.md,更新项目描述、结构、配置说明和 API 端点信息。 - 在 .env.example 中添加 MySQL 数据库配置项。 - 将数据库连接池回收时间从 1 小时减少到 30 分钟 (app/database/connection.py)。 - 修复认证成功后的重定向 URL,从 /keys 指向 /config (app/router/routes.py)。 - 微调认证页面的背景透明度 (app/templates/auth.html)。 - 添加 cryptography 依赖以支持 MySQL 8+ 认证 (requirements.txt)。 - 添加示例图片文件 (files/image*.png)。
This commit is contained in:
@@ -66,7 +66,7 @@ def setup_page_routes(app: FastAPI) -> None:
|
||||
|
||||
if verify_auth_token(auth_token):
|
||||
logger.info("Successful authentication")
|
||||
response = RedirectResponse(url="/keys", status_code=302)
|
||||
response = RedirectResponse(url="/config", status_code=302)
|
||||
response.set_cookie(
|
||||
key="auth_token", value=auth_token, httponly=True, max_age=3600
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user