Files
workavia-drive/tdrive/frontend/src/setupProxy.js
T
2024-07-11 18:44:21 +02:00

19 lines
372 B
JavaScript

const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = function (app) {
[
'/internal',
'/plugins',
].forEach(urlPrefix => {
app.use(
urlPrefix,
createProxyMiddleware({
target: 'http://127.0.0.1:4000',
onError: (err, req, resp) => {
console.log(err);
},
}),
);
});
};