Files
doneit-web/src/setupProxy.js
T
Peter Maquiran b2d141c709 improve
2022-04-28 15:40:57 +01:00

24 lines
585 B
JavaScript

const proxy = require("http-proxy-middleware");
module.exports = function (app) {
app.use(
proxy("/mfp/api/imfpush/", {
target: "http://gpr-dev-10.gabinetedigital.local:9080",
changeOrigin: true,
pathRewrite: function (path, req) {
return path.replace("/mfp/api", "");
},
})
);
app.use(
proxy("/mfp/api", {
target: "http://gpr-dev-10.gabinetedigital.local:9080",
changeOrigin: true,
pathRewrite: function (path, req) {
console.log("Rewrite in /mfp/api: ", path);
return path;
},
})
);
};