diff --git a/dashboard/frontend/src/components/Sidebar.svelte b/dashboard/frontend/src/components/Sidebar.svelte index 7682ff2..938f2ad 100644 --- a/dashboard/frontend/src/components/Sidebar.svelte +++ b/dashboard/frontend/src/components/Sidebar.svelte @@ -9,6 +9,7 @@ ]; const LAN_IP = "192.168.31.221"; + const TS_IP = "100.78.131.124"; let lanReachable = $state(false); if (typeof window !== "undefined" && location.hostname !== LAN_IP) { @@ -36,7 +37,10 @@ function extHref(svc) { if (lanReachable && svc.port) return `http://${LAN_IP}:${svc.port}`; if (svc.remoteHref) return svc.remoteHref; - if (svc.port) return `${location.protocol}//${location.hostname}:${svc.port}`; + if (svc.port) { + const host = /^\d+\.\d+\.\d+\.\d+$/.test(location.hostname) ? location.hostname : TS_IP; + return `http://${host}:${svc.port}`; + } return svc.href; }