mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #600] [CLOSED] fix: use post-middleware request context for config header matching #701
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#701
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/600
Author: @southpolesteve
Created: 3/20/2026
Status: ❌ Closed
Base:
main← Head:fix/use-post-middleware-context-for-headers📄 Description
Summary
One-line fix: config header
has/missingconditions now evaluate against the post-middleware request context instead of the pre-middleware one.Details
The
matchHeaders()call in the Pages Router production server was usingreqCtx(computed before middleware runs) instead ofpostMwReqCtx(rebuilt after middleware request header overrides are applied). This meant if middleware modified headers or cookies, those changes were not visible tohas/missingconditions on config header rules.Rewrites (
beforeFiles,afterFiles,fallback) already usedpostMwReqCtxcorrectly. This brings config header matching in line with that behavior.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.