From 96f9bef27a6026d66b2ff0f44826f6fb95e2756d Mon Sep 17 00:00:00 2001 From: minuk926 Date: Thu, 7 Jul 2022 16:34:30 +0900 Subject: [PATCH] config: production confg fix --- .env.production | 2 +- package.json | 1 - src/setupProxy.js | 10 ---------- src/utils/axios.js | 2 +- 4 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 src/setupProxy.js diff --git a/.env.production b/.env.production index b49e885..0034a47 100644 --- a/.env.production +++ b/.env.production @@ -1,6 +1,6 @@ NODE_PATH=src REACT_APP_MODE=production REACT_APP_VERSION = v0.0.1 -#REACT_APP_API_URL=http://211.119.124.9:8090 +#REACT_APP_API_URL=http://211.119.124.107:8090 REACT_APP_API_URL=http://localhost:8090 REACT_APP_SERVER_TIMEOUT=6000 \ No newline at end of file diff --git a/package.json b/package.json index 54a2f44..e2a9e4b 100755 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "formik": "^2.2.9", "framer-motion": "^4.1.13", "history": "^5.2.0", - "http-proxy-middleware": "^2.0.6", "image-to-base64": "^2.2.0", "jsonwebtoken": "^8.5.1", "jwt-decode": "^3.1.2", diff --git a/src/setupProxy.js b/src/setupProxy.js deleted file mode 100644 index cded6e5..0000000 --- a/src/setupProxy.js +++ /dev/null @@ -1,10 +0,0 @@ -const { createProxyMiddleware } = require('http-proxy-middleware'); - -module.exports = function (app) { - app.use( - createProxyMiddleware('/api/v2', { - target: 'http://localhost:8090', - changeOrigin: true - }) - ); -}; diff --git a/src/utils/axios.js b/src/utils/axios.js index 171e868..baefa5c 100755 --- a/src/utils/axios.js +++ b/src/utils/axios.js @@ -8,7 +8,7 @@ import Swal from 'sweetalert2'; const axiosService = axios.create({ // baseURL: process.env.NODE_ENV === 'development' ? process.env.REACT_APP_API_URL : '', baseURL: process.env.REACT_APP_API_URL, - withCredentials: process.env.NODE_ENV !== 'production', // 개발시만 사용 : crossdomain + withCredentials: true, // process.env.NODE_ENV !== 'production', // 개발시만 사용 : crossdomain timeout: Number(process.env.REACT_APP_SERVER_TIMEOUT), headers: { 'Content-Type': 'application/json'