We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5265f8 commit 769739fCopy full SHA for 769739f
src/shared/utils/misc/favicon-resolver.ts
@@ -2,10 +2,10 @@ import { parseURL } from 'ufo'
2
3
export const faviconResolver = (faviconLink: null | string) => {
4
if (!faviconLink) return null
5
- const hostLink = parseURL(faviconLink).host
6
- if (hostLink) {
7
- // return `https://icons.duckduckgo.com/ip2/${hostLink}.ico`
8
- return `https://www.google.com/s2/favicons?sz=64&domain=${hostLink}`
+ const { host, protocol } = parseURL(faviconLink, 'https://')
+ if (host) {
+ // return `https://icons.duckduckgo.com/ip2/${host}.ico`
+ return `https://www.google.com/s2/favicons?sz=64&domain_url=${protocol}//${host}`
9
}
10
return null
11
0 commit comments