favicon: image/x-icon is an acceptable mime type

This commit is contained in:
Alex Gleason 2025-02-10 21:21:18 -06:00
parent e468072b55
commit 756a9d9607
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -91,7 +91,7 @@ async function fetchFavicon(domain: string, signal?: AbortSignal): Promise<URL>
const fallback = await safeFetch(url, { method: 'HEAD', signal });
const contentType = fallback.headers.get('content-type');
if (fallback.ok && contentType === 'image/vnd.microsoft.icon') {
if (fallback.ok && ['image/vnd.microsoft.icon', 'image/x-icon'].includes(contentType!)) {
logi({ level: 'info', ns: 'ditto.favicon', domain, state: 'found', url });
return url;
}