diff --git a/internal/httpsrv/static/index.html b/internal/httpsrv/static/index.html index a456934..ef3cca8 100644 --- a/internal/httpsrv/static/index.html +++ b/internal/httpsrv/static/index.html @@ -131,7 +131,7 @@ const fmtAgo = secs => { async function refreshConnections() { try { - const r = await fetch('/api/connections'); + const r = await fetch('./api/connections'); const j = await r.json(); const rows = document.getElementById('conn-rows'); const empty = document.getElementById('conn-empty'); @@ -172,7 +172,7 @@ refreshConnections(); function startLogStream() { const status = document.getElementById('status'); const box = document.getElementById('logbox'); - const es = new EventSource('/api/logs'); + const es = new EventSource('./api/logs'); es.onopen = () => { status.textContent = 'log stream: live'; status.className = 'status ok'; }; es.onerror = () => { status.textContent = 'log stream: reconnecting'; status.className = 'status err'; }; es.onmessage = ev => {