From 997786fe93a8ca6c679afb4e772befd374292d5d Mon Sep 17 00:00:00 2001 From: minuk926 Date: Wed, 6 Jul 2022 18:12:38 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20cors=20middleware=20=EC=84=A4=EC=A0=95?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/setupProxy.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/setupProxy.js b/src/setupProxy.js index bb16be4..d383e79 100644 --- a/src/setupProxy.js +++ b/src/setupProxy.js @@ -2,12 +2,10 @@ const { createProxyMiddleware } = require('http-proxy-middleware'); module.exports = function (app) { app.use( - '/api', + '/api/v2', createProxyMiddleware({ target: 'http://localhost:8090', - pathRewrite: { - '^/api': '' - } + changeOrigin: true }) ); };