Repository navigation
fix(stores): Google s2 favicons no longer 404 through next/image - #86
Merged
Merged
Conversation
…ever 404 Google's s2 favicon service answers 404 (with a globe PNG body) for domains it has no icon for, and next/image passes the 404 through, so the crawler flagged /_next/image?url=...s2/favicons... on /stores as broken links. Store logos that point at s2 now go through /api/favicon, which always returns 200 with an image (Google's icon, its globe fallback, or a letter tile), rendered unoptimized. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ThreatCrush Security Scan37 finding(s) MEDIUM: 31 | LOW: 6
Snippets are redacted; ThreatCrush never prints matched credential material. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ThreatCrush Link Watch found 5 x 404 on /stores:
/_next/image?url=https://www.google.com/s2/favicons?domain=...for posh.mk, potbelly.com, sendgrid.net, sportsmansguide.com, tractorsupply.com. Google returns 404 (body: generic globe PNG) when it has no icon, and the optimizer propagates the status.lib/logo.ts:logoSrc()rewrites s2 favicon URLs to/api/favicon?domain=&sz=(unoptimized)app/api/favicon/route.ts: fetches Google, returns 200 with whatever image it gives (icon or globe), else an SVG letter tile; hostname-validated, cached 7dTested locally against the standalone build: posh.mk/potbelly.com 200 image/png, invalid domain 200 svg.
🤖 Generated with Claude Code