Skip to content

fix: repair docs routing for proxied pages#601

Merged
brendanjryan merged 1 commit into
mainfrom
brendanjryan/fix-docs-routing
Jun 28, 2026
Merged

fix: repair docs routing for proxied pages#601
brendanjryan merged 1 commit into
mainfrom
brendanjryan/fix-docs-routing

Conversation

@brendanjryan

@brendanjryan brendanjryan commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Keep RSC route fetches on the current docs origin when a production base URL points elsewhere.
  • Add top-level /tools, /partners, and exact API docs redirects to their canonical /docs/... pages.
  • Add table-driven unit coverage for redirect contracts and RSC route normalization.

Motivation

The docs site can render under docs.tempo.xyz while page metadata sets a base URL on tempo.xyz/developers, causing client-side RSC prefetches to resolve cross-origin and fail CORS. Several user-facing shorthand URLs also returned 404 despite canonical docs pages existing under /docs.

Key design considerations

  • Limit fetch rewriting to /RSC/R/ requests so normal external links and asset requests are unchanged.
  • Preserve the existing /developers RSC route normalization.
  • Use exact /api/... redirects instead of /api/:path* so real API functions such as /api/og remain available.
  • Keep the route expectations encoded in table-driven tests so future redirect changes are explicit.

@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
tempo-docs Ready Ready Preview, Comment Jun 28, 2026 2:53am

Request Review

@brendanjryan brendanjryan marked this pull request as ready for review June 28, 2026 02:32
@brendanjryan brendanjryan force-pushed the brendanjryan/fix-docs-routing branch from b560b6a to 2f0731c Compare June 28, 2026 02:35
@brendanjryan brendanjryan marked this pull request as draft June 28, 2026 02:35
@brendanjryan brendanjryan marked this pull request as ready for review June 28, 2026 02:36
@brendanjryan brendanjryan force-pushed the brendanjryan/fix-docs-routing branch from 2f0731c to 3609cfe Compare June 28, 2026 02:41
@brendanjryan brendanjryan marked this pull request as draft June 28, 2026 02:42
@brendanjryan brendanjryan marked this pull request as ready for review June 28, 2026 02:50
@brendanjryan brendanjryan force-pushed the brendanjryan/fix-docs-routing branch from 3609cfe to 9a941e8 Compare June 28, 2026 02:51
@brendanjryan brendanjryan marked this pull request as draft June 28, 2026 02:52
@brendanjryan brendanjryan marked this pull request as ready for review June 28, 2026 02:55
@brendanjryan brendanjryan merged commit 9bbf35d into main Jun 28, 2026
10 checks passed
@brendanjryan brendanjryan deleted the brendanjryan/fix-docs-routing branch June 28, 2026 02:59
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