From ed6f8062f212ed786a203295570fe1c2b110d9be Mon Sep 17 00:00:00 2001 From: hskwon Date: Tue, 14 Oct 2025 15:36:47 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=8D=B0=EB=AA=A8=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EB=9D=BC=EC=9A=B0=ED=8C=85=20=EB=B0=8F=20API=20URL?= =?UTF-8?q?=20=ED=99=98=EA=B2=BD=EB=B3=80=EC=88=98=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - App.tsx: 라우트를 /d/:token에서 /:token으로 변경 → http://dev.sam.kr/[token] 형식으로 직접 접근 가능 - DemoPage.tsx: API URL을 환경변수(VITE_ADMIN_URL)로 처리 - .env.local에 VITE_ADMIN_URL 추가 --- src/App.tsx | 4 ++-- src/pages/DemoPage.tsx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index c8ddb8a..9792a3a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -9,8 +9,8 @@ function App() { - {/* 데모 페이지 */} - } /> + {/* 데모 페이지 - 토큰 직접 접근 */} + } /> {/* 홈 페이지 */} { const fetchDemoData = async () => { try { - const response = await axios.get(`http://admin.sam.kr/d/${token}`); + const adminUrl = import.meta.env.VITE_ADMIN_URL || 'http://admin.sam.kr'; + const response = await axios.get(`${adminUrl}/d/${token}`); setData(response.data); } catch (error: any) { setData(error.response?.data || {