Skip to content

Commit

Permalink
URL에 dev가 포함되어있다면 VITE_API_URL_DEV 사용하도록 분기 (SWYP-team-2th#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
YOOJS1205 committed Feb 28, 2025
1 parent 90bbac6 commit 996fc43
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/api/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ import {
removeAccessToken,
} from '@/components/login/Auth/token';

const isDevelopment = window.location.host.includes('dev.');

const axiosConfig: AxiosRequestConfig = {
baseURL: import.meta.env.DEV
baseURL: isDevelopment
? import.meta.env.VITE_API_URL_DEV
: import.meta.env.VITE_API_URL_PROD,
validateStatus: (status) => status >= 200 && status < 300,
Expand Down

0 comments on commit 996fc43

Please sign in to comment.