mirror of
https://github.com/multica-ai/multica.git
synced 2026-08-12 19:06:06 +02:00
`resolveBrowserApiBaseUrl` only trimmed trailing slashes, so a relative `NEXT_PUBLIC_API_URL=/api` became the XHR base verbatim: every API call went to `/api/api/**` and every avatar/attachment to `/api/uploads/**`, which the backend serves at the root. The sibling server-side resolver already used the strict `cleanHttpUrl`; this aligns the browser path with it and additionally strips a trailing `/api` from the base, which fixes the absolute `https://host/api` spelling on both paths. Regression from #4840 (first tagged in v0.4.10), which wired up a variable that had been inert in published images. Reported in #6619. Refs: #6619 Co-authored-by: multica-agent <github@multica.ai>