Unexpected middleware response headers present on headers() in app router #52564
Labels
bug
Issue was opened via the bug report template.
linear: next
Confirmed issue that is tracked by the Next.js team.
Runtime
Related to Node.js or Edge Runtime with Next.js.
stale
The issue has not seen recent activity.
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:23 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6020 Binaries: Node: 16.19.1 npm: 8.19.3 Yarn: 1.22.19 pnpm: 7.30.3 Relevant Packages: next: 13.4.10-canary.3 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.6 Next.js Config: output: N/A
Which area(s) of Next.js are affected? (leave empty if unsure)
App Router, Middleware / Edge (API routes, runtime)
Link to the code that reproduces this issue or a replay of the bug
https://github.com/gaspar09/set-set-headers-middleware-nextjs
To Reproduce
visit https://set-set-headers-middleware-nextjs.vercel.app/header?h=2
See the headers:
Describe the Bug
A response header
x-vercel-header-response
is set in middleware.That header is available on an app router page via
import { headers } from "next/headers";
Expected Behavior
Expected that
x-vercel-header-response
is not present onheaders()
Which browser are you using? (if relevant)
Chrome
How are you deploying your application? (if relevant)
Vercel
NEXT-1435
The text was updated successfully, but these errors were encountered: