Repository navigation
Conversation
voyagi
requested review from
a team,
GregBrimble,
MattieTK,
WalshyDev,
irvinebroque and
vy-ton
as code owners
October 20, 2026 17:09
Contributor
Review coverage🟡 1 ownership area needs approval. Suggested reviewers: @dinasaur404 @for-the-kidz @WalshyDev
CODEOWNERS mappings for displayed areas (1)
|
Contributor
AI Review✅ Reviewed Commands
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The "Advanced routing control" section of the Single Page Application page recommends
run_worker_firstwith an array. In that setup, a request with a method other thanGETorHEADto a path that matches none of the patterns never reaches the Worker script: asset serving answers it with405 Method Not Allowed.The section says the array turns off the
Sec-Fetch-Mode: navigatedetection, but not that unlisted non-GETrequests then stop at asset serving. The routing diagram further down reads as if a non-navigation request that matches no file falls through to the Worker script, which is not the case with an array in SPA mode, and no page mentions the 405. This PR adds one note under the example.Why it happens, in workers-sdk at
08f22d3:unstable_canFetchbefore the Worker script is considered (router-workerworker.tsL282-L345).canFetchkeepsnot_found_handling, so in SPA mode every path has an asset intent andcanFetchreturnstrue(asset-workerhandler.tsL284-L322).MethodNotAllowedResponsefor any method other thanGETandHEAD(asset-workerhandler.tsL111-L122).Seen on a deployed Worker with this configuration:
GET /no-such-page200, theindex.htmlshellPOST /no-such-page405 Method Not Allowed, empty bodyPUT /no-such-page405 Method Not Allowed, empty bodyPOST /mcp(listed)Documentation checklist