fix: cors middleware 설정 추가

mpower
minuk926 2 years ago
parent 09e83b88cf
commit 5f41b17def

@ -38,6 +38,7 @@
"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",
@ -95,7 +96,7 @@
"test": "react-scripts test",
"eject": "react-scripts eject",
"format": "prettier --write .",
"serve" : "serve -s build"
"serve": "serve -s build"
},
"eslintConfig": {
"extends": [

@ -0,0 +1,13 @@
const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = function (app) {
app.use(
'/api',
createProxyMiddleware({
target: 'http://localhost:8090',
pathRewrite: {
'^/api': ''
}
})
);
};
Loading…
Cancel
Save