You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
454 B
17 lines
454 B
import { cookies } from "next/headers";
|
|
import { ok } from "@/lib/response";
|
|
import { EMBED_DEMO_COOKIE } from "@/modules/embed-demo/auth";
|
|
|
|
/** POST /api/embed-demo/logout */
|
|
export async function POST() {
|
|
const cookieStore = await cookies();
|
|
cookieStore.set(EMBED_DEMO_COOKIE, "", {
|
|
httpOnly: true,
|
|
secure: process.env.NODE_ENV === "production",
|
|
sameSite: "lax",
|
|
path: "/",
|
|
maxAge: 0,
|
|
});
|
|
return ok({ logged_out: true });
|
|
}
|