Branding: a logo set as an https URL never shows in the console #225

Closed
opened 2026-11-16 21:53:17 +00:00 by jcoffey-dev · 1 comment
Owner

Reported in https://community.coffeylabs.org/t/304: a logo URL set under Settings › System › Branding shows on the server's sign-in page but not in the console.

src/lib/logoCache.ts loads the logo with fetch(${getApiBaseUrl()}/logo) and turns it into an object URL. For a URL logo the server's GET /logo answers 302 to that URL (crates/http/src/branding.rs), and a fetch only follows a cross-origin redirect when the image's host sends CORS headers. Most don't, so the fetch fails and the console falls back to the inbuxa logo. The sign-in page uses a plain <img src="/logo">, which needs no CORS, so it works there. A data: URL logo is served by the server itself and does show.

Fix: show /logo with an <img> and fall back to the inbuxa logo on its error event, rather than fetching it; check the console's CSP allows the image's origin.

Reported in https://community.coffeylabs.org/t/304: a logo URL set under Settings › System › Branding shows on the server's sign-in page but not in the console. `src/lib/logoCache.ts` loads the logo with `fetch(`${getApiBaseUrl()}/logo`)` and turns it into an object URL. For a URL logo the server's `GET /logo` answers 302 to that URL (crates/http/src/branding.rs), and a fetch only follows a cross-origin redirect when the image's host sends CORS headers. Most don't, so the fetch fails and the console falls back to the inbuxa logo. The sign-in page uses a plain `<img src="/logo">`, which needs no CORS, so it works there. A data: URL logo is served by the server itself and does show. Fix: show `/logo` with an `<img>` and fall back to the inbuxa logo on its error event, rather than fetching it; check the console's CSP allows the image's origin.
jcoffey-dev added this to the 27.1 milestone 2026-11-16 21:53:17 +00:00
jcoffey-dev added the bug
priority
p2
labels 2026-11-16 21:53:17 +00:00
jcoffey-dev self-assigned this 2026-11-16 21:53:18 +00:00
Author
Owner

Fixed in #226 (merged as 56e920b0): the console now loads /logo as an image rather than fetching it, so a logo set as an https URL shows whether or not its host sends CORS headers. It ships in the next console release candidate.

Fixed in #226 (merged as 56e920b0): the console now loads `/logo` as an image rather than fetching it, so a logo set as an https URL shows whether or not its host sends CORS headers. It ships in the next console release candidate.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: inbuxa/inbuxa-admin#225