good forst commit
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user