Skip to content

fix static asset detection#65

Merged
hasparus merged 3 commits intomainfrom
perf
Mar 24, 2026
Merged

fix static asset detection#65
hasparus merged 3 commits intomainfrom
perf

Conversation

@hasparus
Copy link
Copy Markdown
Contributor

@hasparus hasparus commented Mar 24, 2026

We now properly serve prerendered docs HTML from Cloudflare ASSETS instead of falling through to Nitro SSR on extensionless routes.

This changes worker asset resolution so /graphql/hive/docs/* can hit static output like .../index.html, which removes the cold ~3s SSR path and brings responses down to static-asset timings with cf-cache-status: HIT and etag.

Verified with:

  • bun test src/server/cloudflare-routing.test.ts
  • curl against preview 1061e818-hive-platform-docs.theguild.workers.dev

Known issue:

  • preview currently canonicalizes /graphql/hive/... to trailing-slash URLs, what doesn't match prod and it kinda annoys me

@hasparus hasparus marked this pull request as ready for review March 24, 2026 14:48
@hasparus hasparus marked this pull request as draft March 24, 2026 14:49
@hasparus hasparus temporarily deployed to storybook-preview March 24, 2026 14:49 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 24, 2026

@hasparus hasparus marked this pull request as ready for review March 24, 2026 15:06
@hasparus hasparus marked this pull request as draft March 24, 2026 15:06
@hasparus hasparus merged commit c58a39f into main Mar 24, 2026
7 checks passed
@hasparus hasparus deleted the perf branch March 24, 2026 16:48
enisdenjo added a commit that referenced this pull request Mar 24, 2026
@hasparus hasparus mentioned this pull request Mar 24, 2026
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.

2 participants