Files
2026-06-09 02:02:40 +05:30

13 lines
430 B
TypeScript

import { TOKEN_COOKIE, jsonResponse } from '../../../_lib/api';
export const dynamic = 'force-dynamic';
export async function POST(): Promise<Response> {
const cookieValue = `${TOKEN_COOKIE}=; Path=/; HttpOnly; SameSite=Lax; Max-Age=0`;
return new Response(null, { status: 204, headers: { 'Set-Cookie': cookieValue } });
}
export function GET(): Response {
return jsonResponse({ message: 'Use POST to log out' }, 405);
}