Fix health endpoint not reachable through nginx proxy

Move /health to /api/health on backend and update the frontend
feature flag store to match. Without this, the combined Docker
image nginx proxy could not reach the endpoint and feature flags
(chunking/prepare mode) failed to load.
This commit is contained in:
Pier-Jean Malandrino 2026-04-03 12:14:15 +02:00
parent 48c5e4ea6b
commit abe59c3cb7
3 changed files with 3 additions and 3 deletions

View file

@ -103,7 +103,7 @@ app.include_router(documents_router)
app.include_router(analyses_router)
@app.get("/health")
@app.get("/api/health")
def health():
"""Health check endpoint."""
return {

View file

@ -26,7 +26,7 @@ def mock_analysis_service(client):
class TestHealthEndpoint:
def test_health(self, client):
resp = client.get("/health")
resp = client.get("/api/health")
assert resp.status_code == 200
data = resp.json()
assert data["status"] == "ok"

View file

@ -44,7 +44,7 @@ export const useFeatureFlagStore = defineStore('feature-flags', () => {
async function load(): Promise<void> {
try {
const data = await apiFetch<HealthResponse>('/health')
const data = await apiFetch<HealthResponse>('/api/health')
engine.value = data.engine
loaded.value = true
error.value = null