更新 API 路由,添加获取所有代理、心跳、锁和会议的端点;修改会议队列和前端请求处理;新增前端完整测试脚本。

This commit is contained in:
Claude Code
2026-03-09 18:24:14 +08:00
parent dc398d7c7b
commit 7a5a58b4e5
17 changed files with 302 additions and 28 deletions

View File

@@ -20,7 +20,15 @@ app = FastAPI(
# 配置 CORS - 允许前端访问
app.add_middleware(
CORSMiddleware,
allow_origins=["http://localhost:3000", "http://127.0.0.1:3000"],
allow_origins=[ # 必须具体列出,不能使用 * 当 allow_credentials=True
"http://localhost:3000",
"http://localhost:3001",
"http://127.0.0.1:3000",
"http://127.0.0.1:3001",
"http://localhost:5173",
"http://127.0.0.1:5173",
"http://localhost:8080",
],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],