File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1+ const getApiBaseUrl = ( ) => {
2+ const host = window . location . hostname ;
3+
4+ if ( host === 'localhost' ) return import . meta. env . VITE_LOCAL_API_URL ;
5+ if ( host === 'test.codemonster.site' ) return import . meta. env . VITE_TEST_URL ;
6+ if ( host === 'codemonster.site' ) return import . meta. env . VITE_BASE_URL ;
7+
8+ return 'https://api.codemonster.site' ;
9+ } ;
10+
11+ export const API_BASE_URL = getApiBaseUrl ( ) ;
Original file line number Diff line number Diff line change 11import { isDevMode } from '@/utils/cookie.ts' ;
22
33import apiInstance from '@/api/apiInstance' ;
4+ import { API_BASE_URL } from '@/api/config.ts' ;
45import { membersInfoMock } from '@/api/mocks.ts' ;
56import { ServerResponse } from '@/api/types' ;
67
7- export const kakaoOauth2LoginUrl = `/oauth2/authorization/kakao` ;
8+ export const kakaoOauth2LoginUrl = `${ API_BASE_URL } /oauth2/authorization/kakao` ;
89
910type ProfileCommonArgs = {
1011 memberName : string ;
You can’t perform that action at this time.
0 commit comments