From 18534bde788e1597337a166c64e40317c0b0aefe Mon Sep 17 00:00:00 2001 From: DeWitt Gibson Date: Wed, 24 Jun 2026 15:36:54 -0700 Subject: [PATCH] fix: Update health.py # 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"]) --- packages/ai-service/app/routers/health.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/ai-service/app/routers/health.py b/packages/ai-service/app/routers/health.py index 368c864..1bdee67 100644 --- a/packages/ai-service/app/routers/health.py +++ b/packages/ai-service/app/routers/health.py @@ -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",