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}`;