fix(cloudflare): route asset upload sessions to the dispatch-namespace endpoint - #1405
Open
pltoledo wants to merge 1 commit into
Open
fix(cloudflare): route asset upload sessions to the dispatch-namespace endpoint#1405pltoledo wants to merge 1 commit into
pltoledo wants to merge 1 commit into
Conversation
…e endpoint When a Worker deploys into a Workers for Platforms dispatch namespace, the asset upload session was still created on the account-level endpoint. The completion JWT comes back scoped to the wrong script identity, and the namespaced script PUT is rejected (400 on a new script, 500 on an existing one). Thread dispatchNamespace through uploadAssets and create the session via createDispatchNamespaceScriptAssetUpload when set, mirroring the namespace-aware helpers already in WorkerProvider (putWorkerScript, getScriptSettings, deleteWorkerScript). The version-upload path is unchanged: namespaced scripts have no versions API and the provider already rejects that combination.
pltoledo
force-pushed
the
fix/dispatch-namespace-assets-upload-session
branch
from
August 29, 2026 16:01
6c35c32 to
70c380f
Compare
sam-goodwin
reviewed
Aug 29, 2026
sam-goodwin
left a comment
Contributor
There was a problem hiding this comment.
Please add a regression test
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.
Asset upload sessions for Workers deployed into a dispatch namespace were created on the account-level endpoint, so the completion JWT comes back scoped to the wrong script identity and the namespaced script PUT is rejected (400 on a new script, 500 on an existing one).
uploadAssetsnow takes the namespace and picks the endpoint the same way the namespace-aware helpers inWorkerProvideralready do (putWorkerScript,getScriptSettings,deleteWorkerScript):The version-upload call site is unchanged: namespaced scripts have no versions API and the provider already rejects
version+namespace.We run this change in production as a patch over
2.0.0-beta.72(Workers for Platforms platform publishing sites into a dispatch namespace, static assets + prebuilt SSR workers); with it,Workerwithnamespaceandassetsdeploys end to end.