Skip to content

fix(docs): exclude opengraph-image.png from proxy matcher#435

Merged
dancer merged 1 commit intomainfrom
josh/fix-og-image-routing
Apr 30, 2026
Merged

fix(docs): exclude opengraph-image.png from proxy matcher#435
dancer merged 1 commit intomainfrom
josh/fix-og-image-routing

Conversation

@dancer
Copy link
Copy Markdown
Collaborator

@dancer dancer commented Apr 30, 2026

summary

https://chat-sdk.dev/opengraph-image.png returned 404 — the social-card image referenced in every page's <meta og:image> was broken.

root cause: the proxy matcher in apps/docs/proxy.ts excludes favicon.ico, sitemap.xml, robots.txt from middleware processing but not opengraph-image.png. Requests fell through to the fumadocs i18n middleware, which couldn't reconcile the root path with localized routing → 404. The image content was still in the build at /_next/static/media/opengraph-image.0.u9ey1jktxlx.png, just unreachable at the convention path.

fix

add opengraph-image\\.png to the matcher exclusion list. matches the standard next.js middleware exclusion pattern from the official docs.

test plan

  • local dev: curl http://localhost:3000/opengraph-image.png returns 200 (was 404)
  • dynamic doc page og images still work via /og/{slug}/image.png (proxy rewrites to /en/og/{slug}/image.png correctly)
  • pnpm validate passes 16/16

@dancer dancer requested a review from a team as a code owner April 30, 2026 19:43
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview, Comment, Open in v0 Apr 30, 2026 7:44pm
chat-sdk-nextjs-chat Ready Ready Preview, Comment, Open in v0 Apr 30, 2026 7:44pm

@dancer dancer merged commit 39a3863 into main Apr 30, 2026
13 checks passed
@dancer dancer deleted the josh/fix-og-image-routing branch April 30, 2026 19:56
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