diff --git a/docker/lnd-ui/index.html b/docker/lnd-ui/index.html index 80cc463e..90f0a176 100644 --- a/docker/lnd-ui/index.html +++ b/docker/lnd-ui/index.html @@ -434,7 +434,7 @@ function getBackendUrl() { const params = new URLSearchParams(window.location.search); - return params.get('backend') || ''; + return params.get('backend') || (window.location.protocol + '//' + window.location.hostname); } function setSettingsTab(tabId) { @@ -629,7 +629,7 @@ async function fetchConnectInfo() { try { - const resp = await fetch('http://' + window.location.hostname + '/lnd-connect-info'); + const resp = await fetch(window.location.protocol + '//' + window.location.hostname + '/lnd-connect-info'); if (!resp.ok) throw new Error('HTTP ' + resp.status); const data = await resp.json(); if (data.cert_base64url) {