summaryrefslogtreecommitdiff
path: root/buildscripts/libdeps/graph_visualizer_web_stack/src/setupProxy.js
blob: 31f23ca4341f7d4da423ec2d2552a7c8c20a4bea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/**
 * 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('/api', {
            target: 'http://localhost:5000',
            changeOrigin: true,
            secure: false,
        })
    );
};