🩹 frontend: fixing proxy in development to backend for /plugins/
This commit is contained in:
committed by
ericlinagora
parent
5f4595338a
commit
5e1ac7b010
@@ -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',
|
);
|
||||||
}),
|
});
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user