automc ui: relative api paths so /infra/mc-router/ proxying works
CI / validate (push) Successful in 13s
CI / docker (push) Successful in 10s

Same fix as svc-proxy: absolute /api/* hit the server-manager origin
when the UI is reverse-proxied at /infra/mc-router/. Switch to ./api/*
so the requests stay under the proxied prefix.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 18:35:00 +02:00
parent e2ce0453fa
commit b995e012be
+2 -2
View File
@@ -92,7 +92,7 @@
<script>
async function refreshRoutes() {
try {
const r = await fetch('/api/routes');
const r = await fetch('./api/routes');
const j = await r.json();
const rows = document.getElementById('route-rows');
const empty = document.getElementById('route-empty');
@@ -121,7 +121,7 @@ refreshRoutes();
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 => {