From 356cd0077264acd95139d92e3a5a20f8d8f1ffff Mon Sep 17 00:00:00 2001 From: Senko-san Date: Wed, 10 Jun 2026 14:20:00 +0300 Subject: [PATCH] fix(health): expose health endpoints under /api/v1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The webui connection ping requests ${apiBase}/health where apiBase is /api/v1, so it was hitting /api/v1/health — a route that never existed (health was mounted only at the root). Mount health_router under the v1 aggregator too; root /health stays in main.py for compose/nginx probes. Co-Authored-By: Claude Opus 4.8 --- app/api/v1/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/api/v1/__init__.py b/app/api/v1/__init__.py index 280d2fd..5b081bc 100644 --- a/app/api/v1/__init__.py +++ b/app/api/v1/__init__.py @@ -2,6 +2,7 @@ from fastapi import APIRouter +from app.api.health import router as health_router from app.api.v1.admin import router as admin_router from app.api.v1.albums import router as albums_router from app.api.v1.artists import router as artists_router @@ -22,6 +23,9 @@ from app.api.v1.user_settings import router as user_settings_router from app.api.v1.users import router as users_router api_v1_router = APIRouter(prefix="/api/v1") +# Also expose health under /api/v1 (root /health stays in main.py for compose/nginx +# probes); the webui pings ${apiBase}/health and apiBase is /api/v1. +api_v1_router.include_router(health_router) api_v1_router.include_router(auth_router) api_v1_router.include_router(users_router) api_v1_router.include_router(tracks_router)