@@ -14,24 +14,15 @@ const integrationFaviconDomain = (url: string | undefined): string | null => {
1414} ;
1515
1616// integrations.sh/logo proxies context.dev's Logo Link behind an edge cache
17- // and is executor's single logo source; Google's favicon service remains in
18- // the cascade as the fallback the <img> onError walks to when the proxy is
19- // unreachable or serves nothing for the domain .
17+ // and is executor's single logo source. Fallbacks ( Google's favicon service,
18+ // a letter placeholder for unknown domains) live inside the proxy, so clients
19+ // never resolve favicons against a third party directly .
2020export function integrationFaviconUrl ( url : string | undefined , size : number ) : string | null {
2121 const domain = integrationFaviconDomain ( url ) ;
2222 if ( ! domain ) return null ;
2323 return `https://integrations.sh/logo/${ domain } ?sz=${ size * 2 } ` ;
2424}
2525
26- export function integrationFaviconFallbackUrl (
27- url : string | undefined ,
28- size : number ,
29- ) : string | null {
30- const domain = integrationFaviconDomain ( url ) ;
31- if ( ! domain ) return null ;
32- return `https://www.google.com/s2/favicons?domain=${ domain } &sz=${ size * 2 } ` ;
33- }
34-
3526export function integrationLocalIconUrl ( integrationId : string | undefined ) : string | null {
3627 if ( integrationId !== "executor" ) return null ;
3728 return "/favicon-32.png" ;
@@ -181,9 +172,9 @@ export function integrationPresetIconUrl(
181172}
182173
183174// Resolution cascade for the rendered favicon: first non-null, non-failed of an
184- // explicit preset icon, the bundled local icon for a known integration id, the
185- // integrations.sh logo proxy derived from the integration URL, then the Google
186- // favicon service as a last resort . The built-in executor integration has no preset
175+ // explicit preset icon, the bundled local icon for a known integration id, then
176+ // the integrations.sh logo proxy derived from the integration URL (which owns
177+ // its own upstream fallbacks) . The built-in executor integration has no preset
187178// icon and no URL, so it resolves ONLY through the integrationId branch: callers
188179// that drop integrationId fall through to the neutral BoxIcon placeholder.
189180export function integrationFaviconSrc ( args : {
@@ -199,7 +190,6 @@ export function integrationFaviconSrc(args: {
199190 args . icon ?? null ,
200191 integrationLocalIconUrl ( args . integrationId ) ,
201192 integrationFaviconUrl ( args . url , args . size ) ,
202- integrationFaviconFallbackUrl ( args . url , args . size ) ,
203193 ] . find ( ( candidate ) => candidate !== null && ! failedSrcs . includes ( candidate ) ) ?? null
204194 ) ;
205195}
0 commit comments