Repository navigation
fix(seo): unblock the preview card (CORP) and add .ico/.png favicons - #3
Merged
Merged
Conversation
The card was never broken: /og-image.png returned 200, image/png, 366 KB and decoded cleanly. The catch-all header rule added Cross-Origin-Resource-Policy: same-origin to it, and browsers refuse to render a cross-origin <img> with that policy — so every preview panel drew an empty box while curl saw a healthy 200. - vercel.json: static assets (card, icons, robots, sitemap, manifest) now send Cross-Origin-Resource-Policy: cross-origin; documents stay same-origin. - index.html: a visually hidden <h1> in #root for crawlers that do not run JS (React clears it on mount, verified by test), plus a <noscript> explanation. - index.html: favicon.ico (16/32/48), favicon-16x16.png and favicon-32x32.png drawn from the same tile geometry — Google ignores SVG favicons. - tests: CORP policy per asset, ICO directory sizes, every advertised icon exists at its declared size, and exactly one H1 in the served HTML. 382 tests, typecheck, build and privacy guard green. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
imgul
added a commit
that referenced
this pull request
Oct 20, 2026
fix(seo): unblock the preview card (CORP) and add .ico/.png favicons
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.
The card was not broken — it was blocked
GET /og-image.pngreturned200,image/png, 366 010 bytes, and the PNG decoded cleanly (1200×630, CRC valid, complete pixel stream). Every preview panel still drew an empty box, because the catch-all header rule had stamped it with:Browsers obey CORP on no-cors requests — which is exactly what
<img>is — so a page on another origin (opengraph.to, Slack web, Discord web) is refused permission to display it. A server-side crawler never sees the header, so "is it 200?" says yes and the card says nothing. That is why this survived the last round of verification: I checked the status code and inferred the rest. Bad inference, fixed here.Fix — static assets (
og-image.png, all icons,robots.txt,sitemap.xml, the manifest) now sendCross-Origin-Resource-Policy: cross-origin. Documents keepsame-origin, so the app still cannot be framed.tests/unit/metadata.test.tsnow fails if the card's CORP is anything else, and fails if documents stop beingsame-origin.The two scoring warnings
Missing
<h1>— the app renders one client-side, but preview bots and crawlers do not run JavaScript, so the served HTML had no heading.index.htmlnow ships a visually hidden<h1>inside#root, and a test asserts React clears it on mount so the rendered page still has exactly one. Also added a<noscript>paragraph — the honest answer for a tool that cannot work without JavaScript.SVG-only favicon — Google Search ignores SVG favicons. Added
favicon.ico(16/32/48),favicon-16x16.pngandfavicon-32x32.png, drawn from the same tile geometry as the app mark, linked ahead of the SVG. The test parses the ICO directory and verifies every advertised size really exists.Not done
twitter:siteneeds a real X handle. Inventing one would point the attribution at somebody else's account, so it is omitted — it is a one-line addition once the handle exists.Verification
npx tsc· 382 tests / 19 files ·npm run build·npm run privacy— green. After deploy,/og-image.pngshould returnCross-Origin-Resource-Policy: cross-origin.