261102_01_ENH: 프로젝트 접근 권한 확인 및 탭별 선택 상태 분리, 공용 인증 쿠키 설정
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { serverEnv } from "@/lib/env.server";
|
||||
import { CookieKeys } from "@/store/cookie/cookie-keys";
|
||||
import { setAuthCookie } from "@/lib/auth-cookie";
|
||||
|
||||
/** Stateless backend authentication has no logout API; discard the frontend session cookie. */
|
||||
export async function POST() {
|
||||
@@ -8,12 +7,6 @@ export async function POST() {
|
||||
{ ok: true },
|
||||
{ headers: { "Cache-Control": "no-store" } },
|
||||
);
|
||||
response.cookies.set(CookieKeys.AuthToken, "", {
|
||||
httpOnly: true,
|
||||
secure: ["prod", "production"].includes(serverEnv.ENV),
|
||||
sameSite: "lax",
|
||||
path: "/",
|
||||
maxAge: 0,
|
||||
});
|
||||
setAuthCookie(response, "");
|
||||
return response;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user