Pages Router cookie behavior differs from App Router despite similar implementation expectations.
The issue reports inconsistent cookie handling between Pages Router and App Router when using `response.cookies.set()`. The fix requires aligning behavior or documenting the difference, but involves core routing logic. Maintainer comments suggest the headers are technically present but not properly propagated.
https://github.com/thomasboyt/nextjs-broken-pages-router-proxy-cookies-behavior
next devlocalhost:3000/app-demo. Notice that the new cookie value is displayed correctly in the rendered component.localhost:3000/pages-demo. Notice that the new cookie value is not displayed correctly.The Pages Router should support the same behavior as App Router, as implemented in https://github.com/vercel/next.js/pull/65008: setting cookies using response.cookies.set() should show the new cookie values in ctx.req.cookies in getServerSideProps, as they show up in next/headers's cookies() function in App Router.
Otherwise, the documentation on https://nextjs.org/docs/pages/api-reference/file-conventions/proxy#using-cookies should be updated to indicate this is expected to not work in Pages Router.
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 25.3.0: Wed Jan 28 20:48:41 PST 2026; root:xnu-12377.81.4~5/RELEASE_ARM64_T6041
Available memory (MB): 49152
Available CPU cores: 16
Binaries:
Node: 22.22.0
npm: 10.9.4
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 16.2.0-canary.51 // Latest available version is detected (16.2.0-canary.51).
eslint-config-next: N/A
react: 19.2.3
react-dom: 19.2.3
typescript: 5.9.3
Next.js Config:
output: N/A
Pages Router, Middleware
next dev (local), next start (local)
This is blocking an incremental rewrite of my application in App Router. My application heavily used getServerSideProps and set various cookies in its logic. I am trying to move the logic that was used for all requests t
Claim this issue to let others know you're working on it. You'll earn 20 points when you complete it!