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
7 changes: 6 additions & 1 deletion apps/api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1721,9 +1721,14 @@ async def security_policy_html():
return HTMLResponse(_SECURITY_POLICY_HTML)


@app.get("/health")
@app.api_route("/health", methods=["GET", "HEAD"])
@limiter.limit("60/minute")
async def health(request: Request):
# Health endpoints are commonly probed with HEAD (it's the default method for
# several uptime monitors). HEAD wants a cheap liveness signal, not the full
# catalog payload — return a bare 200 with an empty body and skip the DB work.
if request.method == "HEAD":
return Response(status_code=200)
from core.db import get_pool_stats
pool = getattr(request.app.state, "pool", None)
# Section 6 (v0.7.8): rename catalog fields to disambiguate. The old shape
Expand Down
Loading