fix(routing): treat basePath as a literal prefix
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 69/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- next.js, typescript, vite
- Domain
- backend
Research direction
Start with the upstream commit linked in the issue, then locate request routing code and its routing tests. Check where basePath is removed before route matching and add coverage for paths containing regex metacharacters. Done means removal treats the configured value literally, respects prefix boundaries, and the routing tests confirm matching after removal.
Written by the indexing model from the issue text.
Description
Upstream
https://github.com/vercel/next.js/commit/a9437d1d42961c638e6d0ca7382aab5d0c77b5c2
Problem
Prefix removal must not interpolate basePath into an unescaped regular expression. Valid base paths containing regular-expression metacharacters can otherwise be stripped incorrectly before route matching.
Expected behavior
Remove the configured base path with literal, boundary-aware prefix logic throughout request routing.
Coverage
Add routing coverage for base paths containing regex metacharacters and verify matching after the prefix is removed.
- Dominant language
- TypeScript
- Stars
- 9.2k
- Forks
- 441
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 392
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudflare/vinext
-
nextjs-tracking
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
cloudflare/vinext#3887 ·
Maintainers usually reply within 1 day
-
docs: document deployment with Cloudflare Workers Builds / Git integrationPossibly taken @reginaldalfret claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
cloudflare/vinext#3738 ·
Maintainers usually reply within 1 day
-
Standalone server.js does not default NODE_ENV to productionPossibly taken @reginaldalfret claimed this 19 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cloudflare/vinext#3444 ·
Maintainers usually reply within 1 day
-
create-vinext-app generates `packageManager` without a pnpm version on windows, causing corepack to failPossibly taken @NriotHrreion claimed this 26 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cloudflare/vinext#3322 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
cloudflare/vinext#3221 · 2 comments ·
Maintainers usually reply within 1 day
All issues in cloudflare/vinext
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AvaProtocol/ava-sdk-js#276 ·
Maintainers usually reply within 1 day
-
useFragment does not require `variables` when the fragment's variables type has required fieldsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apollographql/apollo-client#13493 ·
Maintainers usually reply within 1 day
-
Custom hosts written as trailing-dot FQDNs (`host.local.`) aren't detected as local backendsPossibly taken @roboomp claimed this today. Openbug prio:p2 providers triaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
can1357/oh-my-pi#15798 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
code-yeongyu/oh-my-openagent#10172 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
PDFCraftTool/pdfcraft#189 ·