MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / GET

Function GET

apps/public/src/app/api/headers/route.ts:15–29  ·  view source on GitHub ↗
(req: Request)

Source from the content-addressed store, hash-verified

13];
14
15export 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};

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected