Small favicon service refactor

This commit is contained in:
Alex Gleason committed 2025-12-22 18:08:12 -06:00
1 parent 8eeea7b188
commit 581f6406dc
1 file changed
+3 -6
+3 -6
View File
@@ -37,10 +37,7 @@ export default {
// Strip `ai.` and `api.` subdomains for a better chance at finding a favicon
hostname = hostname.replace(/^(ai\.|api\.)/, '');
return fetchFavicon(hostname);
// Fetch the favicon from DuckDuckGo's service
return fetch(`https://external-content.duckduckgo.com/ip3/${hostname}.ico`);
},
};
function fetchFavicon(hostname: string): Promise<Response> {
return fetch(`https://external-content.duckduckgo.com/ip3/${hostname}.ico`);
}
};