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