mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #191] [MERGED] fix: matchConfigPattern incorrectly matches :param with literal suffix #378
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#378
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/191
Author: @jokull
Created: 2/28/2026
Status: ✅ Merged
Merged: 3/2/2026
Merged by: @southpolesteve
Base:
main← Head:fix/config-pattern-param-suffix📝 Commits (1)
0238bd0fix: matchConfigPattern incorrectly matches :param with literal suffix📊 Changes
4 files changed (+32 additions, -3 deletions)
View changed files
📝
packages/vinext/src/config/config-matchers.ts(+5 -1)📝
packages/vinext/src/index.ts(+2 -1)📝
packages/vinext/src/server/app-dev-server.ts(+1 -1)📝
tests/shims.test.ts(+24 -0)📄 Description
Summary
/:slug.mdfell through to the simple segment matcher, which treatedslug.mdas the entire parameter name and matched any single-segment path (including/){ source: "/:slug.md", destination: "/api/markdown/:slug" }to rewrite every page request, resulting in 404s on all routes/:[\w-]+\./.test(pattern)to the condition that triggers the regex-based matcher, which already tokenizes:slug+.+mdcorrectlyTest plan
/:slug.mdpattern via bothindex.tsandconfig/config-matchers.tsmatchConfigPatterntests pass (no regressions)GET /returns 200 with HTML (was 404 before)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.