summaryrefslogtreecommitdiff
path: root/buildscripts/libdeps/graph_visualizer_web_stack/src/setupProxy.js
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/libdeps/graph_visualizer_web_stack/src/setupProxy.js')
-rw-r--r--buildscripts/libdeps/graph_visualizer_web_stack/src/setupProxy.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/buildscripts/libdeps/graph_visualizer_web_stack/src/setupProxy.js b/buildscripts/libdeps/graph_visualizer_web_stack/src/setupProxy.js
new file mode 100644
index 00000000000..d3b4e0dc9ed
--- /dev/null
+++ b/buildscripts/libdeps/graph_visualizer_web_stack/src/setupProxy.js
@@ -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
+ })
+ );
+}; \ No newline at end of file