diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-03-21 17:51:49 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-03-21 17:51:49 -0700 |
commit | 69a38ffe392ca4bae7daf82a50c9b9d2166fae28 (patch) | |
tree | 1ffc3f380c6cbae858dd6819a03cbd39cdd78a25 /modern/src/setupProxy.js | |
parent | 95cbf0277936012c01e46c2a3625d5bdeebb48ae (diff) | |
download | trackermap-web-69a38ffe392ca4bae7daf82a50c9b9d2166fae28.tar.gz trackermap-web-69a38ffe392ca4bae7daf82a50c9b9d2166fae28.tar.bz2 trackermap-web-69a38ffe392ca4bae7daf82a50c9b9d2166fae28.zip |
Fix websocket proxy
Diffstat (limited to 'modern/src/setupProxy.js')
-rw-r--r-- | modern/src/setupProxy.js | 6 |
1 files changed, 6 insertions, 0 deletions
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' })); +}; |