From 70ea74e3963154e4b28b43207f8fd8f5ef8ecee9 Mon Sep 17 00:00:00 2001 From: amogus22877769 Date: Fri, 22 May 2026 20:12:16 +0300 Subject: [PATCH] fix(cli): use /api/monitoring/health for server readiness check (#2578) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(cli): use /api/monitoring/health for server readiness check — the CLI waitForServer() was polling the auth-protected /api/health (401), causing omniroute serve to hang indefinitely. Now uses the public /api/monitoring/health endpoint. (#2578 — thanks @amogus22877769) --- bin/cli/utils/pid.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cli/utils/pid.mjs b/bin/cli/utils/pid.mjs index cb98269612..1f3ff526df 100644 --- a/bin/cli/utils/pid.mjs +++ b/bin/cli/utils/pid.mjs @@ -65,7 +65,7 @@ export async function waitForServer(port, timeout = 15000) { const start = Date.now(); while (Date.now() - start < timeout) { try { - const res = await fetch(`http://localhost:${port}/api/health`, { + const res = await fetch(`http://localhost:${port}/api/monitoring/health`, { signal: AbortSignal.timeout(2000), }); if (res.ok) return true;