fix: cors middleware 설정 추가

dev
minuk926 2 years ago
parent aa2d044208
commit 37baeaa4c5

@ -1,10 +1,10 @@
// const { createProxyMiddleware } = require('http-proxy-middleware');
//
// module.exports = function (app) {
// app.use(
// createProxyMiddleware('/api/v1', {
// target: 'http://localhost:8090',
// changeOrigin: true
// })
// );
// };
const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = function (app) {
app.use(
createProxyMiddleware('/api/v1', {
target: 'http://localhost:8090',
changeOrigin: true
})
);
};

@ -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: true, // process.env.NODE_ENV !== 'production', // 개발시만 사용 : crossdomain
withCredentials: process.env.NODE_ENV !== 'production', // 개발시만 사용 : crossdomain
timeout: Number(process.env.REACT_APP_SERVER_TIMEOUT),
headers: {
'Content-Type': 'application/json'

Loading…
Cancel
Save