mirror of
https://github.com/root-fr/jmap-webmail.git
synced 2026-09-24 00:01:14 +00:00
DuckDuckGo responds with a 48x48 "no favicon" placeholder (HTTP 404 with an image body) for domains it doesn't have an icon for, and both Chromium and Firefox fire the img load event for that response and ignore the status code — so the placeholder was being rendered as if it were the real favicon. Route the lookup through a new /api/favicon edge route that fetches the upstream, checks the status, and returns either the image body on 200 or a status-only 404 on miss. Now the img element's error event fires correctly for unknown domains and the avatar falls back to the initials. The route validates the domain shape and caches successful responses for a week on the client. Domain-only lookup preserves the same privacy posture — the email address never leaves the browser.