diff --git a/app/gateway-status.tsx b/app/gateway-status.tsx index dd8f1e1..01a4bc3 100644 --- a/app/gateway-status.tsx +++ b/app/gateway-status.tsx @@ -3,6 +3,15 @@ import { useEffect, useState, useCallback } from "react"; import { useI18n } from "@/lib/i18n"; +function resolveGatewayUrl(url?: string): string | undefined { + if (!url || typeof window === "undefined") return url; + try { + const parsed = new URL(url); + if (parsed.hostname === "localhost") parsed.hostname = window.location.hostname; + return parsed.toString(); + } catch { return url; } +} + interface HealthResult { ok: boolean; error?: string; @@ -31,7 +40,7 @@ export function GatewayStatus() { return (