SERVER-67329 Add proxy middleware to allow react-scripts start

This commit is contained in:
Mitch Wagner
2022-06-16 19:08:49 +00:00
committed by Evergreen Agent
parent b4556dec6c
commit f4e6ef798a
2 changed files with 21 additions and 4 deletions

View File

@@ -0,0 +1,17 @@
/**
* This proxy is intended to allow the visualizer to run in a development environment
* which includes SSH tunnels communicating with private remote hosts.
*/
const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = function(app) {
app.use(
createProxyMiddleware('/socket.io', {
target: 'http://localhost:5000',
ws: true,
changeOrigin: true,
secure: false
})
);
};