mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
25 lines
646 B
JavaScript
25 lines
646 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) {
|
|
console.log("Rewrite in /mfp/api/imfpush/: ", path);
|
|
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;
|
|
},
|
|
})
|
|
);
|
|
};
|