From ddb1296a8a645b4012ff64584f38e461ff3ea7e3 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 28 Nov 2024 14:44:34 +0900 Subject: [PATCH] =?UTF-8?q?settings:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20api?= =?UTF-8?q?=20=EB=8A=94=20msw=20=EC=82=AC=EC=9A=A9=ED=95=98=EA=B3=A0=20?= =?UTF-8?q?=EB=82=98=EB=A8=B8=EC=A7=80=20api=EB=8A=94=20=EC=8B=A4=EC=A0=9C?= =?UTF-8?q?=20api=20=EC=9A=94=EC=B2=AD=EA=B0=80=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20(#145)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- next.config.mjs | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index 16677b4f..2f1204bc 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -10,17 +10,27 @@ const nextConfig = { `, }, async rewrites() { - if (process.env.NODE_ENV === 'development') { - return [] - } return [ { - source: '/api/:path*', - destination: `${process.env.API_HOST}/api/:path*`, + source: '/api/users/reissue/refreshtoken', + destination: '/api/users/reissue/refreshtoken', + }, + { + source: '/api/users/login', + destination: '/api/users/login', }, + { + source: '/api/:path*', + destination: 'http://15.164.90.102:8081/api/:path*', + has: [ + { + type: 'header', + key: 'host' + } + ] + } ] }, - webpack: (config, { isServer }) => { if (isServer) { if (Array.isArray(config.resolve.alias)) {