mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #301] [MERGED] Revert "Rebuild request context after middleware modifies headers" #456
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#456
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/301
Author: @james-elicx
Created: 3/6/2026
Status: ✅ Merged
Merged: 3/6/2026
Merged by: @southpolesteve
Base:
main← Head:revert-288-fix/refresh-request-context-after-middleware📝 Commits (2)
82da8afRevert "Rebuild request context after middleware modifies headers (#288)"070a03bchange test into a regression test📊 Changes
4 files changed (+9 additions, -24 deletions)
View changed files
📝
packages/vinext/src/deploy.ts(+2 -9)📝
packages/vinext/src/server/prod-server.ts(+2 -10)📝
tests/fixtures/pages-basic/middleware.ts(+2 -2)📝
tests/pages-router.test.ts(+3 -3)📄 Description
Based on what the Next.js docs describe, I believe that behaviour is the opposite to how Next.js work.
https://nextjs.org/docs/14/pages/building-your-application/routing/middleware#matching-paths
The docs state that the config's
headersandredirectsare evaluated before the middleware, which suggests that #288 enabling them to be evaluated after is the incorrect behaviour.Does not revert the unpacking of
x-middleware-request-*headers as that sounds reasonable.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.