You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you set response headers in middleware.ts I expect it not to be on both the request headers and response headers in any route. Can confirm this is an issue on 15.x.x, and on latest 14.
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct 2 16:16:55 UTC 2
Available memory (MB): 14800
Available CPU cores: 16
Binaries:
Node: 20.18.0
npm: 11.1.0
Yarn: N/A
pnpm: 9.15.4
Relevant Packages:
next: 15.2.4 // Latest available version is detected (15.2.4).
eslint-config-next: 15.2.4
react: 19.1.0
react-dom: 19.1.0
typescript: 5.8.2
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Middleware, Headers
Which stage(s) are affected? (Select all that apply)
next start (local), next dev (local)
Additional context
I tested with standalone build too. Same problem there.
The text was updated successfully, but these errors were encountered:
Link to the code that reproduces this issue
https://github.com/sommeeeer/opennext-middleware-request-headers-issue
To Reproduce
pnpm build && pnpm start
curl http://localhost:3000/test
Current vs. Expected behavior
When you set response headers in
middleware.ts
I expect it not to be on both the request headers and response headers in any route. Can confirm this is an issue on15.x.x
, and on latest 14.Provide environment information
Operating System: Platform: linux Arch: x64 Version: #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct 2 16:16:55 UTC 2 Available memory (MB): 14800 Available CPU cores: 16 Binaries: Node: 20.18.0 npm: 11.1.0 Yarn: N/A pnpm: 9.15.4 Relevant Packages: next: 15.2.4 // Latest available version is detected (15.2.4). eslint-config-next: 15.2.4 react: 19.1.0 react-dom: 19.1.0 typescript: 5.8.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Middleware, Headers
Which stage(s) are affected? (Select all that apply)
next start (local), next dev (local)
Additional context
I tested with
standalone
build too. Same problem there.The text was updated successfully, but these errors were encountered: