reactjs/src/setProxy.js
2020-05-08 19:21:14 +07:00

11 lines
250 B
JavaScript

const proxy=require('http-proxy-middleware');
module.exports=function(app){
app.use(
proxy("/findAll",{
target:"http://localhost:8081/api/product",
changeOrigin: true,
secure:false
})
);
};