Skip to content

fix(seo): cache-bust the card so scrapers see the fixed headers - #5

Merged
imgul merged 1 commit into
mainfrom
arena/e1235655-env-compare
Oct 20, 2026
Merged

imgul merged 1 commit into
mainfrom
arena/e1235655-env-compare

Conversation

@imgul

@imgul imgul commented Oct 20, 2026

Copy link
Copy Markdown
Member

The header is right now (verified live: Cross-Origin-Resource-Policy: cross-origin on /og-image.png, same-origin on documents), but two caches were still serving the broken version:

  1. The edge held the pre-fix response with s-maxage=604800 — a week of staleness on a correction.
  2. Every scraper caches by full URL, so the bare og-image.png would keep showing a broken card even after it healed.

This PR:

  • Assets cache for an hour (max-age=3600, s-maxage=3600), so a mistake heals in an hour instead of a week.
  • The card is referenced as og-image.png?v=1 in og:image, twitter:image and the JSON-LD. Every platform fetches a URL it has never cached. Bump the version whenever the image changes.

Two new assertions: the card URL carries its version, and the asset cache lifetime stays short.

383 tests, typecheck, build and guard green.

The edge was still serving the pre-fix response for og-image.png (s-maxage was
a week), so a corrected header could not reach a scraper. Assets now cache for
an hour, and the card is referenced as og-image.png?v=1 so every platform
fetches a URL it has never cached. Bump the version whenever the image changes.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@imgul
imgul merged commit 7aaf8a2 into main Oct 20, 2026
1 check failed
imgul added a commit that referenced this pull request Oct 20, 2026
fix(seo): cache-bust the card so scrapers see the fixed headers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant