fix(web): use /global/health for readiness check

This commit is contained in:
Bohdan Triapitsyn
2026-02-02 19:01:27 +02:00
parent 1d9e7056f4
commit 24bb8d8f95
+8 -2
View File
@@ -1959,13 +1959,19 @@ async function waitForReady(url, timeoutMs = 10000) {
try {
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), 3000);
const res = await fetch(`${url.replace(/\/+$/, '')}/config`, {
const res = await fetch(`${url.replace(/\/+$/, '')}/global/health`, {
method: 'GET',
headers: { Accept: 'application/json' },
signal: controller.signal
});
clearTimeout(timeout);
if (res.ok) return true;
if (res.ok) {
const body = await res.json().catch(() => null);
if (body?.healthy === true) {
return true;
}
}
} catch {
// ignore
}