From 2475d460d3c50ed6944305278fe76d582d460250 Mon Sep 17 00:00:00 2001 From: swcho Date: Mon, 10 Nov 2025 13:53:49 +0900 Subject: [PATCH] =?UTF-8?q?chmod:=20location=20->=20window.location=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/src/entities/auth/lib/auth-wrapper.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/wr/src/entities/auth/lib/auth-wrapper.tsx b/apps/wr/src/entities/auth/lib/auth-wrapper.tsx index fdb88711b..dcc6e81cd 100644 --- a/apps/wr/src/entities/auth/lib/auth-wrapper.tsx +++ b/apps/wr/src/entities/auth/lib/auth-wrapper.tsx @@ -43,8 +43,7 @@ const AuthWrapper = ({ children }: { children: React.ReactNode }) => { console.error("Token refresh failed:", refreshError); setUserInfo(null); - // const hostname = window.location.hostname; - const hostname = location.hostname; + const hostname = window.location.hostname; // 개발 환경에서는 localhost 도메인 사용 if (hostname === "localhost" || hostname === "127.0.0.1" || hostname === "con.mind-one.co.kr") @@ -52,7 +51,7 @@ const AuthWrapper = ({ children }: { children: React.ReactNode }) => { // 운영 환경에서는 서브도메인을 포함한 최상위 도메인 사용 // router.push는 같은 Next.js 앱 내에서만 작동하므로 다른 앱으로 이동할 때는 window.location.href 사용 - if (hostname.includes("hasuon.or.kr")) location.href = LOGIN_PAGE_URL; // 세션 만료 시 CM 로그인 페이지로 리다이렉트 + if (hostname.includes("hasuon.or.kr")) window.location.href = LOGIN_PAGE_URL; // 세션 만료 시 CM 로그인 페이지로 리다이렉트 } } })();