mirror of
https://github.com/ZhuLinsen/daily_stock_analysis.git
synced 2026-10-07 16:38:18 +08:00
* fix: register health router in v1 API so /api/v1/health returns 200 The health endpoint at api/v1/endpoints/health.py was defined but never included in api/v1/router.py, causing /api/v1/health to return 404 while /api/health worked fine. This adds the missing include_router call and a test covering both paths. Fixes #1561 * fix: exempt /api/v1/health from auth middleware and add auth-enabled tests When ADMIN_AUTH_ENABLED=true, AuthMiddleware blocks all /api/v1/* paths not in EXEMPT_PATHS. The newly registered /api/v1/health was missing from that list, so unauthenticated health probes from load balancers or monitors would get 401 instead of 200. Adds /api/v1/health to EXEMPT_PATHS and covers both /api/health and /api/v1/health under the auth-enabled scenario. * fix: correct auth-enabled test mock target and add CHANGELOG entry - Patch api.middlewares.auth.is_auth_enabled instead of src.auth so the mock actually reaches AuthMiddleware.dispatch - Add [Unreleased] entry to docs/CHANGELOG.md * chore: remove unused import os from test_api_health.py