mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-21 12:17:49 +00:00
headers endpoint
This commit is contained in:
17
apps/login/src/app/headers/route.ts
Normal file
17
apps/login/src/app/headers/route.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
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