mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 08:32:39 +00:00
headers route
This commit is contained in:
13
apps/login/src/app/headers/route.ts
Normal file
13
apps/login/src/app/headers/route.ts
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
|
export const dynamic = "force-dynamic";
|
||||||
|
export const revalidate = false;
|
||||||
|
export const fetchCache = "default-no-store";
|
||||||
|
export async function GET(request: NextRequest) {
|
||||||
|
const headers = request.headers;
|
||||||
|
// Convert headers to a plain object
|
||||||
|
const headersObject: Record<string, string> = {};
|
||||||
|
headers.forEach((value, key) => {
|
||||||
|
headersObject[key] = value;
|
||||||
|
});
|
||||||
|
return NextResponse.json(headersObject);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user