[cs] feat: 로그인 시 X-Device-Id 헤더 추가

This commit is contained in:
2026-07-16 18:22:58 +09:00
parent c74917d1d9
commit 1a1ff2ec30
4 changed files with 40 additions and 4 deletions
+7 -2
View File
@@ -1,3 +1,6 @@
import { cookies } from "next/headers";
import { NextResponse } from "next/server";
import {
ACCESS_TOKEN,
AUTH_USER_ID,
@@ -7,8 +10,6 @@ import {
SERVER_API_URL,
SITE_ID,
} from "@/shared/config";
import { cookies } from "next/headers";
import { NextResponse } from "next/server";
async function handler(
request: Request,
@@ -20,6 +21,10 @@ async function handler(
"Content-Type": "application/json",
"X-Site-Id": SITE_ID,
};
const deviceId = request.headers.get("X-Device-Id");
if (deviceId) {
headers["X-Device-Id"] = deviceId;
}
let body = {};
const isRefreshHandler = params.url.includes("refresh");