BUG: /health endpoint intercepted by nginx — returns text/plain "healthy\n", not application/json #72
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
The nginx config in
services/web-ui/nginx.confhas a dedicated/healthlocation block:This means ALL requests going through the web-ui reverse proxy (port 42423) to
/healthare served directly by nginx — never reaching the mam-api'sapp.get('/health', ...)handler which returns{"status":"ok"}.The
add_headerline is also dead code —returndirectives execute beforeadd_header, soContent-Typeis never set. nginx's default istext/plain.Impact
deploy/api-smoke.shdoesn't test/healthbut the discrepancy between the code and deployed behavior is confusing/healthresponse is unreachable through the proxyVerification
But directly hitting mam-api on port 45431:
Location
services/web-ui/nginx.conf:80-83Fix
Either:
/healthblock to let it proxy through to mam-apireturn 200 '{"status":"ok"}\n';Additionally, the
add_headerline is a no-op afterreturn— either usedefault_type application/jsonfirst, or remove the add_header.