cloudflare / vinext

fix: matchConfigPattern incorrectly matches :param with literal suffix (#191)
Patterns like `/:slug.md` were falling through to the simple segment matcher, which treated `slug.md` as the entire parameter name and matched any single-segment path (including `/`). This caused rewrites like `{ source: "/:slug.md", destination: "/api/markdown/:slug" }` to rewrite every page request, resulting in 404s. Add `/:[\w-]+\./.test(pattern)` to the condition that triggers the regex-based matcher, which already tokenizes `:slug` + `.` + `md` correctly. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Jökull Sólberg Auðunsson Jökull Sólberg Auðunsson committed on Mar 2, 2026, 01:27 AM
Showing 4 changed files +32 additions -3 deletions
Browse files at this commit →