Skip to content

Commit e0095eb

Browse files
author
Yang_Hae_Seok
authored
Merge pull request #146 from FC-DEV-FinalProject/settings/api-baseurl-145
[Settings]: 로그인 api 는 msw 사용하고 나머지 api는 실제 api 요청가도록 수정
2 parents dea58f8 + ddb1296 commit e0095eb

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

next.config.mjs

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,27 @@ const nextConfig = {
1010
`,
1111
},
1212
async rewrites() {
13-
if (process.env.NODE_ENV === 'development') {
14-
return []
15-
}
1613
return [
1714
{
18-
source: '/api/:path*',
19-
destination: `${process.env.API_HOST}/api/:path*`,
15+
source: '/api/users/reissue/refreshtoken',
16+
destination: '/api/users/reissue/refreshtoken',
17+
},
18+
{
19+
source: '/api/users/login',
20+
destination: '/api/users/login',
2021
},
22+
{
23+
source: '/api/:path*',
24+
destination: 'http://15.164.90.102:8081/api/:path*',
25+
has: [
26+
{
27+
type: 'header',
28+
key: 'host'
29+
}
30+
]
31+
}
2132
]
2233
},
23-
2434
webpack: (config, { isServer }) => {
2535
if (isServer) {
2636
if (Array.isArray(config.resolve.alias)) {

0 commit comments

Comments
 (0)