ui: relative api paths so /infra/svc-proxy/ proxying works
Absolute /api/* resolved against the dashboard origin, hitting server-manager's 404 instead of the proxied svc-proxy. Switch to ./api/* so they land under the same /infra/svc-proxy/ prefix. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user