🩹 frontend: fixing proxy in development to backend for /plugins/

This commit is contained in:
Eric Doughty-Papassideris
2024-06-13 14:52:38 +02:00
committed by ericlinagora
parent 5f4595338a
commit 5e1ac7b010
+13 -14
View File
@@ -1,19 +1,18 @@
const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = function (app) {
app.use(
[
'/internal',
createProxyMiddleware({
target: 'http://127.0.0.1:4000',
onError: (err, req, resp) => {
console.log(err);
},
}),
);
app.use(
'/__',
createProxyMiddleware({
target: 'http://127.0.0.1:4000',
}),
);
'/plugins',
].forEach(urlPrefix => {
app.use(
urlPrefix,
createProxyMiddleware({
target: 'http://127.0.0.1:4000',
onError: (err, req, resp) => {
console.log(err);
},
}),
);
});
};