mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-03 10:34:55 +02:00
12 lines
348 B
TypeScript
12 lines
348 B
TypeScript
import { cookies } from "next/headers";
|
|
|
|
export async function authCookieHeader() {
|
|
const allCookies = await cookies();
|
|
const cookieName = process.env.SESSION_COOKIE_NAME!;
|
|
const sessionId = allCookies.get(cookieName)?.value ?? null;
|
|
return {
|
|
headers: {
|
|
Cookie: `${cookieName}=${sessionId}`,
|
|
},
|
|
};
|
|
}
|