fosrl.pangolin/src/api/cookies.ts
2024-10-14 15:00:10 -04:00

10 lines
234 B
TypeScript

import { cookies } from "next/headers";
export function authCookieHeader() {
const sessionId = cookies().get("session")?.value ?? null;
return {
headers: {
Cookie: `session=${sessionId}`
}
}
}