Skip to content

Fix aliased prerendered asset redirects#69

Draft
hasparus wants to merge 2 commits intomainfrom
more-tests
Draft

Fix aliased prerendered asset redirects#69
hasparus wants to merge 2 commits intomainfrom
more-tests

Conversation

@hasparus
Copy link
Collaborator

Cloudflare Assets can still emit same-path trailing-slash redirects for prerendered pages when website-router strips the /graphql/hive mount before proxying upstream. That broke the real prod contract: raw upstream / and /docs/... had to resolve while still emitting /graphql/hive/... links.

This keeps prerender first, but follows that one safe aliased asset redirect internally instead of exposing it. It also adds integration coverage for the real website-router contract: raw upstream / and /docs/gateway must return HTML whose canonicals, nav links, and asset URLs stay /graphql/hive/....

Tests:

  • bun --bun tsc --noEmit
  • bun test src/server/cloudflare-routing.test.ts
  • bun test src/routes/docs/-$.test.ts
  • CI=true bunx playwright test e2e/landing-page.e2e.ts --project=chromium

@github-actions
Copy link

github-actions bot commented Mar 25, 2026

@hasparus hasparus marked this pull request as draft March 25, 2026 13:29
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