The bug: in split deployments (Admin in Docker pointed at the server through API_BASE_URL / the api-base-url meta tag), the dashboard's live-metrics EventSource was built from window.location.origin. It reached the Admin nginx instead of the server, got the SPA shell back, and live metrics silently stopped. Every other /api/live caller already used getApiBaseUrl(); liveMetricsStore.getOrigin() was the only one that didn't.
The fix (porkmagus):getOrigin() delegates to the shared getApiBaseUrl(). Same-origin deployments behave exactly as before. A regression test covers both cases.
On top: one commit of mine adds the AGPL modification notice to liveMetricsStore.ts, since this is the first change to that upstream-derived file.
Ported from GitHub inbuxa/inbuxa-admin#8 by **porkmagus** (https://github.com/porkmagus) — thank you! Their commit e4dcb70 is merged unchanged, so the authorship is theirs.
**The bug:** in split deployments (Admin in Docker pointed at the server through API_BASE_URL / the `api-base-url` meta tag), the dashboard's live-metrics EventSource was built from `window.location.origin`. It reached the Admin nginx instead of the server, got the SPA shell back, and live metrics silently stopped. Every other `/api/live` caller already used `getApiBaseUrl()`; `liveMetricsStore.getOrigin()` was the only one that didn't.
**The fix (porkmagus):** `getOrigin()` delegates to the shared `getApiBaseUrl()`. Same-origin deployments behave exactly as before. A regression test covers both cases.
**On top:** one commit of mine adds the AGPL modification notice to `liveMetricsStore.ts`, since this is the first change to that upstream-derived file.
Checked locally: npm ci, typecheck, lint, i18n:check, notice check, 650 tests, build.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Ported from GitHub inbuxa/inbuxa-admin#8 by porkmagus (https://github.com/porkmagus) — thank you! Their commit
e4dcb70is merged unchanged, so the authorship is theirs.The bug: in split deployments (Admin in Docker pointed at the server through API_BASE_URL / the
api-base-urlmeta tag), the dashboard's live-metrics EventSource was built fromwindow.location.origin. It reached the Admin nginx instead of the server, got the SPA shell back, and live metrics silently stopped. Every other/api/livecaller already usedgetApiBaseUrl();liveMetricsStore.getOrigin()was the only one that didn't.The fix (porkmagus):
getOrigin()delegates to the sharedgetApiBaseUrl(). Same-origin deployments behave exactly as before. A regression test covers both cases.On top: one commit of mine adds the AGPL modification notice to
liveMetricsStore.ts, since this is the first change to that upstream-derived file.Checked locally: npm ci, typecheck, lint, i18n:check, notice check, 650 tests, build.