2025-11-03 21:53:52 +05:30

15 lines
422 B
TypeScript

import { cookies } from 'next/headers';
import { NextResponse } from 'next/server';
export async function GET() {
if (process.env.NODE_ENV === 'production') {
return new NextResponse('Not found', { status: 404 });
}
const c = cookies();
return NextResponse.json({
d4a_uid: c.get('d4a_uid')?.value ?? null,
d4a_session_set: !!c.get('d4a_session'),
d4a_exp: c.get('d4a_exp')?.value ?? null,
});
}