Skip to content

fix(worker): route application paths through gateway - #661

Merged
tiankaima merged 1 commit into
mainfrom
fix/worker-first-app-routes
Jul 26, 2026
Merged

fix(worker): route application paths through gateway#661
tiankaima merged 1 commit into
mainfrom
fix/worker-first-app-routes

Conversation

@tiankaima

Copy link
Copy Markdown
Member

Summary

  • invoke the outer Worker for application routes, including unmatched paths
  • keep immutable app bundles and public asset directories on Cloudflare Static Assets
  • mirror production routing in E2E and lock the route patterns with a unit test

Why

Cloudflare production metadata showed raw_run_worker_first: false, and live unmatched requests bypassed the outer gateway even though the direct 404 branch was deployed. Selective assets.run_worker_first guarantees the gateway runs for app routes without charging Worker CPU for static bundles and images.

Verification

  • bunx vitest run (254 files, 1568 tests)
  • bun run build
  • bunx wrangler deploy --dry-run --config wrangler.jsonc
  • local Wrangler: unknown route = 404, 808 bytes, no script; /_app/version.json and /images/icon.png remain static responses
  • bunx biome check . (passes with one pre-existing unused-parameter warning)

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
life-ustc 9bee8ea Jul 26 2026, 07:13 PM

@github-actions

Copy link
Copy Markdown

@tiankaima
tiankaima merged commit 06f45a1 into main Jul 26, 2026
15 checks passed
@tiankaima
tiankaima deleted the fix/worker-first-app-routes branch July 26, 2026 19:22
github-actions Bot pushed a commit that referenced this pull request Jul 26, 2026
## [1.77.20](v1.77.19...v1.77.20) (2026-07-26)

### Bug Fixes

* **worker:** route application paths through gateway ([#661](#661)) ([06f45a1](06f45a1))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.77.20 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant