Fix: [2.0.1] Nginx rewrite에 맞게 FastAPI 라우트 prefix 제거
All checks were successful
news-summary-bot-cicd / build_push_deploy (push) Successful in 4m47s
All checks were successful
news-summary-bot-cicd / build_push_deploy (push) Successful in 4m47s
Nginx가 /api/news/ prefix를 strip하므로 FastAPI 라우트를 /api/news/summarize → /summarize, /api/news/health → /health로 수정 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,7 @@ class SummarizeRequest(BaseModel):
|
|||||||
title: str = ""
|
title: str = ""
|
||||||
|
|
||||||
|
|
||||||
@app.post("/api/news/summarize")
|
@app.post("/summarize")
|
||||||
async def summarize_video(
|
async def summarize_video(
|
||||||
req: SummarizeRequest,
|
req: SummarizeRequest,
|
||||||
x_api_secret: str = Header(default=""),
|
x_api_secret: str = Header(default=""),
|
||||||
@@ -31,6 +31,6 @@ async def summarize_video(
|
|||||||
return {"status": "ok", "title": title, "summary_length": len(summary)}
|
return {"status": "ok", "title": title, "summary_length": len(summary)}
|
||||||
|
|
||||||
|
|
||||||
@app.get("/api/news/health")
|
@app.get("/health")
|
||||||
async def health():
|
async def health():
|
||||||
return {"status": "ok"}
|
return {"status": "ok"}
|
||||||
|
|||||||
Reference in New Issue
Block a user