(req: Request)
| 13 | ]; |
| 14 | |
| 15 | export const GET = function POST(req: Request) { |
| 16 | return NextResponse.json({ |
| 17 | headers: Object.fromEntries(req.headers), |
| 18 | ips: IP_HEADER_ORDER.reduce( |
| 19 | (acc, header) => { |
| 20 | const value = req.headers.get(header); |
| 21 | if (value) { |
| 22 | acc[header] = value; |
| 23 | } |
| 24 | return acc; |
| 25 | }, |
| 26 | {} as Record<string, string>, |
| 27 | ), |
| 28 | }); |
| 29 | }; |