We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cca59fb commit ade5e85Copy full SHA for ade5e85
1 file changed
apps/ticket/src/app/api/logout/route.ts
@@ -1,3 +1,4 @@
1
+import { cookies } from "next/headers";
2
import { NextResponse } from "next/server";
3
4
import { API_URL } from "@/data/constants";
@@ -6,9 +7,14 @@ import { API_URL } from "@/data/constants";
6
7
* 로그아웃 요청 API
8
*/
9
export async function POST(req: Request) {
10
+ const cookiesStore = await cookies();
11
+
12
const apiRes = await fetch(process.env.NEXT_PUBLIC_TICKET_API_BASE_URL + API_URL.USER.LOGOUT, {
13
method: "POST",
- headers: { "Content-Type": "application/json" },
14
+ headers: {
15
+ "Content-Type": "application/json",
16
+ Cookie: `accessToken=${cookiesStore.get("accessToken")?.value}; refreshToken=${cookiesStore.get("refreshToken")?.value}`,
17
+ },
18
credentials: "include",
19
});
20
0 commit comments