From cf2b5d4e8013d352d46058efd952eceb09d27766 Mon Sep 17 00:00:00 2001 From: dohyeons Date: Tue, 11 Nov 2025 16:59:16 +0900 Subject: [PATCH] =?UTF-8?q?url=EC=9D=84=20=EB=A7=9E=EC=B6=B0=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/lib/api/client.ts | 5 +++++ frontend/lib/utils/apiUrl.ts | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/frontend/lib/api/client.ts b/frontend/lib/api/client.ts index 7dc811c9..7279092e 100644 --- a/frontend/lib/api/client.ts +++ b/frontend/lib/api/client.ts @@ -13,6 +13,11 @@ const getApiBaseUrl = (): string => { const currentPort = window.location.port; const protocol = window.location.protocol; + // 프로덕션 환경: logistream.kpslp.kr → 백엔드는 같은 도메인 8080 포트 + if (currentHost === "logistream.kpslp.kr") { + return `${protocol}//${currentHost}:8080/api`; + } + // 프로덕션 환경: v1.vexplor.com → api.vexplor.com if (currentHost === "v1.vexplor.com") { return "https://api.vexplor.com/api"; diff --git a/frontend/lib/utils/apiUrl.ts b/frontend/lib/utils/apiUrl.ts index ea334b86..c50dc533 100644 --- a/frontend/lib/utils/apiUrl.ts +++ b/frontend/lib/utils/apiUrl.ts @@ -8,6 +8,11 @@ export function getApiUrl(endpoint: string): string { if (typeof window !== "undefined") { const hostname = window.location.hostname; + // 프로덕션: logistream.kpslp.kr → 백엔드는 같은 도메인 8080 포트 + if (hostname === "logistream.kpslp.kr") { + return `https://logistream.kpslp.kr:8080${endpoint}`; + } + // 프로덕션: v1.vexplor.com → https://api.vexplor.com if (hostname === "v1.vexplor.com") { return `https://api.vexplor.com${endpoint}`;