refactor: 'SITE_ID' 환경변수 쿠키로 수정

This commit is contained in:
2025-06-30 13:23:29 +09:00
parent 0e9d865f44
commit 9a38ce33c0
6 changed files with 15 additions and 10 deletions
@@ -4,7 +4,6 @@ import {
CLAIM_NAME,
REFRESH_TOKEN,
SERVER_API_URL,
SITE_ID,
} from "@/shared/config";
import { cookies } from "next/headers";
import { NextResponse } from "next/server";
@@ -15,9 +14,10 @@ async function handler(
method: "GET" | "POST" | "PUT" | "DELETE",
) {
const cookieStore = await cookies();
const siteId = cookieStore.get("site-id-key")?.value ?? "";
const headers: Record<string, string> = {
"Content-Type": "application/json",
"X-Site-Id": SITE_ID,
"X-Site-Id": siteId,
};
let body = {};
const isRefreshHandler = params.url.includes("refresh");