Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/ai-service/app/routers/health.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
router = APIRouter()


@router.get("/health")
# Accept HEAD as well as GET: the container HEALTHCHECK (wget --spider) and App
# Service's warmup probe issue HEAD requests. A GET-only route answers HEAD with
# 405, which marks the container perpetually unhealthy and App Service kills it.
@router.api_route("/health", methods=["GET", "HEAD"])
async def health_check():
return {
"status": "ok",
Expand Down
Loading