mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-01 21:02:12 +03:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user