I would expect Next.js 13.3.x dev server to have the same behavior as the production server in regards to handling headers, like how Next.js 13.2.x did.
import type { NextApiRequest, NextApiResponse } from 'next';
export default function handler(req: NextApiRequest, res: NextApiResponse) {
res.status(200).json({ 'content-encoding': req.headers['content-encoding'] });
}
Which browser are you using? (if relevant)
N/A
How are you deploying your application? (if relevant)
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue
https://stackblitz.com/edit/vercel-next-js-vhqros
To Reproduce
Start dev server:
Send request with a
Content-Encoding
header to the endpoint:Describe the Bug
The Next.js 13.3.x dev server returns
Whereas the production server (and Next.js 13.2.x dev server) returns:
Potentially related discussion
Expected Behavior
I would expect Next.js 13.3.x dev server to have the same behavior as the production server in regards to handling headers, like how Next.js 13.2.x did.
Which browser are you using? (if relevant)
N/A
How are you deploying your application? (if relevant)
N/A