diff --git a/frontend/lib/api/client.ts b/frontend/lib/api/client.ts index 717c35b3..5d9aac4a 100644 --- a/frontend/lib/api/client.ts +++ b/frontend/lib/api/client.ts @@ -35,9 +35,9 @@ const getApiBaseUrl = (): string => { return "https://api.vexplor.com/api"; } - // 접속 host 기준 포트 8080 백엔드로 — 엣지 배포 일반화 경로 - const protocol = window.location.protocol; - return `${protocol}//${currentHost}:8080/api`; + // 엣지/온프레미스 일반화: FE 자신을 통한 상대 경로 사용 → next.config rewrites() 가 + // /api/* 를 SERVER_API_URL 로 프록시. 브라우저는 FE 포트(9771 등) 한 곳만 열려 있으면 됨. + return "/api"; } return "http://localhost:8080/api";