From 272385a120d3775494fef09574cbf76bb48a8ae3 Mon Sep 17 00:00:00 2001 From: hyeonsu Date: Thu, 4 Sep 2025 16:10:26 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B6=94=EA=B0=80=EC=88=98=EC=A0=95=20(claude)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/lib/api/client.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/lib/api/client.ts b/frontend/lib/api/client.ts index 41987d41..ecd20973 100644 --- a/frontend/lib/api/client.ts +++ b/frontend/lib/api/client.ts @@ -21,7 +21,13 @@ const getApiBaseUrl = (): string => { return "http://localhost:8080/api"; } - // 서버 환경 (내부/외부 IP 모두): → 39.117.244.52:8080 + // 서버 환경에서 localhost:5555 → 39.117.244.52:8080 + if ((currentHost === "localhost" || currentHost === "127.0.0.1") && currentPort === "5555") { + console.log("🌍 서버 환경 (localhost:5555) 감지 → 39.117.244.52:8080/api"); + return "http://39.117.244.52:8080/api"; + } + + // 기타 서버 환경 (내부/외부 IP): → 39.117.244.52:8080 console.log("🌍 서버 환경 감지 → 39.117.244.52:8080/api"); return "http://39.117.244.52:8080/api"; }