fix(cli): use /api/monitoring/health for server readiness check (#2578)

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)
This commit is contained in:
amogus22877769
2026-05-22 20:12:16 +03:00
committed by GitHub
parent 32b729176d
commit 70ea74e396

View File

@@ -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;