mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
### What? Adding back `x-forwarded-*` headers. ### Why? Starting with #52492, these headers were lost. ### How? We can populate these headers before executing a request. Closes NEXT-1663 Fixes #55942
4 lines
94 B
TypeScript
4 lines
94 B
TypeScript
export function GET(req: Request) {
|
|
return Response.json(Object.fromEntries(req.headers))
|
|
}
|