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:
parent
48c5e4ea6b
commit
abe59c3cb7
3 changed files with 3 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue