From 69a38ffe392ca4bae7daf82a50c9b9d2166fae28 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 21 Mar 2020 17:51:49 -0700 Subject: Fix websocket proxy --- modern/src/setupProxy.js | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 modern/src/setupProxy.js (limited to 'modern/src/setupProxy.js') diff --git a/modern/src/setupProxy.js b/modern/src/setupProxy.js new file mode 100644 index 00000000..71312d50 --- /dev/null +++ b/modern/src/setupProxy.js @@ -0,0 +1,6 @@ +const proxy = require('http-proxy-middleware'); + +module.exports = function(app) { + app.use(proxy('/api/socket', { target: 'ws://localhost:8082', ws: true })); + app.use(proxy('/api', { target: 'http://localhost:8082' })); +}; -- cgit v1.2.3