mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #134] [CLOSED] fix: support has/missing conditions on config headers and fix glob exclude patterns in routing #340
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#340
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/134
Author: @erayack
Created: 2/26/2026
Status: ❌ Closed
Base:
main← Head:fix/config-headers-has-missing-and-glob-routing📝 Commits (1)
50f84e7fix: support has/missing conditions on config headers and fix glob exclude patterns in routing📊 Changes
11 files changed (+184 additions, -27 deletions)
View changed files
📝
packages/vinext/src/config/config-matchers.ts(+9 -0)📝
packages/vinext/src/config/next-config.ts(+29 -1)📝
packages/vinext/src/routing/app-router.ts(+6 -2)📝
packages/vinext/src/routing/pages-router.ts(+4 -1)📝
packages/vinext/src/server/app-dev-server.ts(+10 -3)📝
packages/vinext/src/server/prod-server.ts(+1 -1)📝
tests/e2e/app-router/config-redirect.spec.ts(+24 -10)📝
tests/e2e/pages-router/head-and-dynamic.spec.ts(+6 -2)📝
tests/fixtures/app-basic/next.config.ts(+12 -0)📝
tests/nextjs-compat/TRACKING.md(+6 -7)📝
tests/shims.test.ts(+77 -0)📄 Description
Summary
Fixes config
headers()matcher parity with redirects/rewrites by addinghas/missingcondition evaluation, and hardens behavior to fail closed when conditional header rules are evaluated without request context.What changed
has/missingsupport to config header matching in shared matcher and dev server path.NextHeadertyping to includehasandmissing.has/missingconditions.matchHeaders, including no-context fail-closed behavior.next/dynamic) by replacing ambiguous text locator with an exact heading-role locator.Why
Previously,
headers()rules only matchedsourceand ignored request-context conditions, causing behavior mismatch with redirects/rewrites and Next.js compatibility gaps.Validation
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.