diff --git a/src/app/api/url.ts b/src/app/api/url.ts index 602c19eb..16edf8f6 100644 --- a/src/app/api/url.ts +++ b/src/app/api/url.ts @@ -4,5 +4,5 @@ export const DOMAIN = process.env.NODE_ENV === "production" - ? "http://finthepen.gonetis.com" // 배포 시 실제로 연결할 서버로 변경하기 https://finthepen.site + ? import.meta.env.VITE_LOCAL_DOMAIN : "/local"; // 로컬 서버와 연결할 때 (단, MSW 동작 시 로컬 서버로 요청이 나가지 않고 mocking 당할 수 있음) diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts index 42824b66..51a41f5e 100644 --- a/src/vite-env.d.ts +++ b/src/vite-env.d.ts @@ -2,5 +2,6 @@ interface ImportMeta { env: { VITE_LOCAL_MODE: string; + VITE_LOCAL_DOMAIN: string; }; } diff --git a/vite.config.ts b/vite.config.ts index f6c00f7c..2c37d5a8 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -10,7 +10,7 @@ export default defineConfig({ server: { proxy: { "/local": { - target: "http://finthepen.gonetis.com", + target: "http://localhost:8080", changeOrigin: true, rewrite: (path) => path.replace(/^\/local/, ""), },