Skip to content

Pr/matthewdavidrodgers/9416#9505

Closed
CarmenPopoviciu wants to merge 8 commits intomainfrom
pr/matthewdavidrodgers/9416
Closed

Pr/matthewdavidrodgers/9416#9505
CarmenPopoviciu wants to merge 8 commits intomainfrom
pr/matthewdavidrodgers/9416

Conversation

@CarmenPopoviciu
Copy link
Contributor

Fixes #[insert GH or internal issue link(s)].

Describe your change...


  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because:
  • Wrangler / Vite E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because:
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because:
  • Wrangler V3 Backport
    • TODO (before merge)
    • Wrangler PR:
    • Not necessary because:

matthewdavidrodgers and others added 8 commits June 5, 2025 11:24
- When a request matches a static routing "exclude" rule, it's directly
forwarded to the asset worker.

- When a request matches a static routing "include" rule, it's directly
forwarded to the user worker.

- Otherwise, previous behavior takes over

This also adds a new analytics field (double6) for what routing decision
was made
vitest yelled at me and told me this should be awaited and may error in
future releases
When the Router worker has static routing, the check against
"Sec-Fetch-Mode: navigate" is unnecessary. We have explicit static
routing to indicate whether or not we should go to a User worker or
the Asset worker, and should not try and guess via usually-set browser
headers

This adds a new parameter to unstable_canFetch RPC method, which should
be fine for backwards compatibility, and can be extended in the future
if needed. This was necessary because the Asset worker checks the
Request headers for Sec-Fetch-Mode to indicate if it can serve an asset
(including an index.html or 404.html page based on not_found_handling),
but static routing is only provided to the Router worker. Thus, we need
to pass more information over RPC
Now that we're not providing this configuration via _routes.json, we can
relax some of the configuration. Much of this happens on the backend,
but some field names have been changed ("include" -> "worker",
"exclude"->"asset")
@CarmenPopoviciu CarmenPopoviciu requested review from a team as code owners June 6, 2025 10:29
@changeset-bot
Copy link

changeset-bot bot commented Jun 6, 2025

🦋 Changeset detected

Latest commit: ccad014

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cloudflare/workers-shared Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@CarmenPopoviciu CarmenPopoviciu added e2e Run wrangler + vite-plugin e2e tests on a PR every-os labels Jun 6, 2025
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Jun 6, 2025
@CarmenPopoviciu CarmenPopoviciu added skip-pr-description-validation Skip validation of the required PR description format skip-v3-pr labels Jun 6, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jun 6, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@9505

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@9505

miniflare

npm i https://pkg.pr.new/miniflare@9505

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@9505

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@9505

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@9505

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@9505

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@9505

wrangler

npm i https://pkg.pr.new/wrangler@9505

commit: ccad014

@CarmenPopoviciu CarmenPopoviciu marked this pull request as draft June 6, 2025 11:46
@penalosa penalosa closed this Jul 15, 2025
@github-project-automation github-project-automation bot moved this from Untriaged to Done in workers-sdk Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e Run wrangler + vite-plugin e2e tests on a PR skip-pr-description-validation Skip validation of the required PR description format

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants