mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Small favicon service refactor
This commit is contained in:
1 file changed
+3
-6
+3
-6
@@ -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`);
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user