Open akshayeshenoi opened 6 years ago
No, currently the webapp-starter does not support proxying websocket connections. It's a good idea, and something we've considered. For now, you could look at the predix-toolkit code for an example of proxying web socket connections. https://github.com/PredixDev/predix-tool-kit/blob/master/server/security-app.js
Also, this npm package is very popular, and supports web socket proxying: https://github.com/nodejitsu/node-http-proxy
Would you be willing to accept a PR?
Yes, I think a PR would be useful. How are you planning to implement it?
Kind of like how it's implemented in the predix-toolkit example code you shared.
All communication will depend upon this socketID. Sounds good?
Sounds good. Let's try to keep most of this logic in a separate file in the /server directory. Thanks for the initiative.
Hi! Is it currently possible to reverse-proxy WebSocket connections initiated by the browser to a custom microservice? The lack of it requires the front-end to connect to the microservice directly which entails authentication woes.