요청 서버 주소 수정(claude)

This commit is contained in:
hyeonsu 2025-09-04 16:01:33 +09:00
parent 592b4d7222
commit 205dc05251
1 changed files with 4 additions and 3 deletions

View File

@ -6,17 +6,18 @@ const getApiBaseUrl = (): string => {
if (typeof window !== "undefined") {
const currentHost = window.location.hostname;
const currentPort = window.location.port;
const fullUrl = window.location.href;
console.log("🌐 현재 접속 정보:", {
hostname: currentHost,
fullUrl: fullUrl,
port: window.location.port,
port: currentPort,
});
// 로컬 개발환경: localhost:9771 → localhost:8080
if (currentHost === "localhost" || currentHost === "127.0.0.1") {
console.log("🏠 로컬 환경 감지 → localhost:8080/api");
if ((currentHost === "localhost" || currentHost === "127.0.0.1") && currentPort === "9771") {
console.log("🏠 로컬 개발 환경 감지 → localhost:8080/api");
return "http://localhost:8080/api";
}