test: 升级版本号到 0.1.1 测试自动更新
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -13,15 +13,17 @@ from app.routers import candidate, room, chat, init, files, admin
|
|||||||
app = FastAPI(
|
app = FastAPI(
|
||||||
title="AI Interview API",
|
title="AI Interview API",
|
||||||
description="AI 语音面试系统后端 API",
|
description="AI 语音面试系统后端 API",
|
||||||
version="0.1.0",
|
version="0.1.1", # 测试自动更新
|
||||||
docs_url="/docs" if settings.DEBUG else None,
|
docs_url="/docs" if settings.DEBUG else None,
|
||||||
redoc_url="/redoc" if settings.DEBUG else None,
|
redoc_url="/redoc" if settings.DEBUG else None,
|
||||||
)
|
)
|
||||||
|
|
||||||
# 配置 CORS
|
# 配置 CORS - 支持多租户通配符域名
|
||||||
|
# *.interview.ai.ireborn.com.cn
|
||||||
app.add_middleware(
|
app.add_middleware(
|
||||||
CORSMiddleware,
|
CORSMiddleware,
|
||||||
allow_origins=settings.CORS_ORIGINS,
|
allow_origins=["*"] if settings.CORS_ALLOW_ALL else settings.CORS_ORIGINS,
|
||||||
|
allow_origin_regex=r"https?://[a-zA-Z0-9_-]+\.interview\.ai\.ireborn\.com\.cn",
|
||||||
allow_credentials=True,
|
allow_credentials=True,
|
||||||
allow_methods=["*"],
|
allow_methods=["*"],
|
||||||
allow_headers=["*"],
|
allow_headers=["*"],
|
||||||
@@ -41,7 +43,7 @@ app.include_router(admin.router, tags=["管理后台"])
|
|||||||
@app.get("/health")
|
@app.get("/health")
|
||||||
async def health_check():
|
async def health_check():
|
||||||
"""健康检查"""
|
"""健康检查"""
|
||||||
return {"status": "ok", "version": "0.1.0"}
|
return {"status": "ok", "version": "0.1.1"}
|
||||||
|
|
||||||
|
|
||||||
@app.on_event("startup")
|
@app.on_event("startup")
|
||||||
|
|||||||
Reference in New Issue
Block a user