SPB Git forge

spb/rareindex

Public
54commits 1branches 0releases
7.1 MBsize
maindefault branch
10 days agolast push
TypeScript 61.9% HTML 37.2% SQL 0.7%
391 B · 12 lines typescript
Raw Blame History
1import { NextResponse } from 'next/server';2import { destroySession } from '@/lib/auth/session';34export const dynamic = 'force-dynamic';56/** POST /api/auth/logout — used by the user menu and by API clients; GET is not allowed (CSRF). */7export async function POST(req: Request) {8  await destroySession();9  const url = new URL('/', req.url);10  return NextResponse.redirect(url, 303);11}12