(url: URL)
| 222 | |
| 223 | // Check if URL is a direct image |
| 224 | function isDirectImage(url: URL): boolean { |
| 225 | const imageExtensions = ['svg', 'png', 'jpg', 'jpeg', 'gif', 'webp', 'ico']; |
| 226 | return ( |
| 227 | imageExtensions.some((ext) => url.pathname.endsWith(`.${ext}`)) || |
| 228 | url.toString().includes('googleusercontent.com') |
| 229 | ); |
| 230 | } |
| 231 | |
| 232 | export async function getFavicon( |
| 233 | request: FastifyRequest<{ |
no test coverage detected