Merge remote-tracking branch 'origin/v3.4' into dev

This commit is contained in:
proddy
2022-01-23 17:56:52 +01:00
parent 02e2b51814
commit 77e1898512
538 changed files with 32282 additions and 38655 deletions

View File

@@ -1,21 +1,19 @@
const pkg = require('../package.json');
const { createProxyMiddleware } = require('http-proxy-middleware');
const target = process.env.PROXY || pkg.proxy;
module.exports = function (app) {
app.use(
'/rest/*',
createProxyMiddleware({
target: 'http://localhost:3080',
secure: false,
changeOrigin: true
createProxyMiddleware('/api', {
target
})
);
app.use(
'/es/*',
createProxyMiddleware({
target: 'http://localhost:3090',
secure: false,
changeOrigin: true
})
);
// app.use(
// createProxyMiddleware('/ws', {
// target: target,
// // target: target.replace(/^http(s?):\/\//, 'ws$1://'),
// ws: true
// })
// );
};