Skip to content

cherry-pick: Fix static plugin serving nothing when urlPath is configured (conflicts → v5.1)#1739

Open
github-actions[bot] wants to merge 5 commits into
v5.1from
cherry-pick/v5.1/pr-1584
Open

cherry-pick: Fix static plugin serving nothing when urlPath is configured (conflicts → v5.1)#1739
github-actions[bot] wants to merge 5 commits into
v5.1from
cherry-pick/v5.1/pr-1584

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Cherry-pick of PR #1584 onto `v5.1` produced conflicts on commit(s): `21d022b5408705280ffcb829b9c041427b61233b eb6631d aae9a11 24ef8e9 ebff1f4 a2e9a63`.

Resolve the conflict markers on branch `cherry-pick/v5.1/pr-1584` and merge this PR.

@claude please review branch `cherry-pick/v5.1/pr-1584` and suggest a patch that resolves the conflict markers (<<<<<<< / ======= / >>>>>>>) introduced by cherry-picking PR #1584 onto `v5.1`. Post the suggested patch as a comment here — do not push.

nizzlenitz and others added 5 commits July 9, 2026 15:56
Two stacked defects: the Scope server proxy passed the raw config value
('assets') as the route mount, which can never match leading-slash
pathnames; and the routing chain strips the mount prefix from
req.pathname while the static maps were keyed by the full entry URL
path. normalizeUrlPath now ensures a leading slash, the Scope proxy
resolves urlPath via resolveBaseURLPath (same normalization as the
entry pipeline), and static.ts keys its maps relative to the mount
base captured at registration. urlPath runtime changes now request a
restart (the route mount cannot be re-registered live), and the mount
root disambiguates the no-slash form via the unstripped request so
the root index 301s to the trailing-slash path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…oot disambiguation

Codex review: BunRequest sets _nodeRequest to null, so the mount-root
redirect silently never fired on Bun. stripPrefix now exposes the
unstripped pathname as an explicit property instead of handlers
reaching into runtime internals. Verified on both runtimes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Gemini review: both 301 Location headers dropped the original query
string.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Keep the common index-serve path (200, no redirect) allocation-free by
computing queryIndex/query lazily inside each 301 branch instead of
unconditionally on every index request. Static serving is in the request
hot path. Follow-up to review on #1584.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
no-restricted-imports bans the node:assert/strict subpath; node:assert
exports the same strictEqual/ok. Unblocks runLinter on #1584.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant