agentgui 1.0.967 → 1.0.968
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/site/app/js/backend.js +6 -1
package/package.json
CHANGED
package/site/app/js/backend.js
CHANGED
|
@@ -34,7 +34,12 @@ export function getBackend() {
|
|
|
34
34
|
const u = new URL(location.href);
|
|
35
35
|
const fromQs = u.searchParams.get('backend');
|
|
36
36
|
if (fromQs) { lsSet(KEY, fromQs); return fromQs; }
|
|
37
|
-
|
|
37
|
+
// Same-origin default: honour the server-injected router prefix so HTTP
|
|
38
|
+
// calls (/health, /v1/history/*, /api/*) stay under the proxied path
|
|
39
|
+
// (e.g. /gm) instead of hitting the site root, where a path-routing proxy
|
|
40
|
+
// (nginx Basic auth) challenges and the browser re-prompts for a password.
|
|
41
|
+
const bu = (typeof window !== 'undefined' && window.__BASE_URL) || '';
|
|
42
|
+
return lsGet(KEY) || DEFAULT_BACKEND || String(bu).replace(/\/+$/, '');
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
export function setBackend(url) { lsSet(KEY, url); }
|