2-update driver pages [fixed image display and notyfi] 3-update car pages [fixed image] 4-build tripe pages crud 5-build some role pages 6-build audit page 7-update ui compounants 8-update saidebar and topbar 9-cheange view to be ar view 10-cheange stractcher to be app,src 11-add validation layer by yup 12-add api image-proxy to broke image corse bloken
17 lines
438 B
TypeScript
17 lines
438 B
TypeScript
|
|
// Clears the HttpOnly auth cookie on logout.
|
|
// Only the server can delete an HttpOnly cookie.
|
|
|
|
import { NextResponse } from "next/server";
|
|
|
|
export async function POST() {
|
|
const response = NextResponse.json({ ok: true });
|
|
|
|
// Overwrite the cookie with an empty value and a past expiry date.
|
|
response.headers.set(
|
|
"Set-Cookie",
|
|
"auth_token=; HttpOnly; Secure; SameSite=Strict; Path=/; Max-Age=0",
|
|
);
|
|
|
|
return response;
|
|
} |