From bd1aaddf6845623539102c3e7fe0ad72fca460b6 Mon Sep 17 00:00:00 2001 From: minuk926 Date: Wed, 6 Jul 2022 18:15:21 +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 | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/setupProxy.js diff --git a/src/setupProxy.js b/src/setupProxy.js new file mode 100644 index 0000000..c132185 --- /dev/null +++ b/src/setupProxy.js @@ -0,0 +1,10 @@ +const { createProxyMiddleware } = require('http-proxy-middleware'); + +module.exports = function (app) { + app.use( + createProxyMiddleware('/api/v1', { + target: 'http://localhost:8090', + changeOrigin: true + }) + ); +};