Copyright © https://mongoose-os.com

Mongoose OS Forum

frame
ATTENTION! This forum has moved to:

https://community.mongoose-os.com

Do not post any new messages.

Can reverse proxy handle Web Sockets too?

PreevMoPreevMo New Hampshire

We have a scenario where we will be running multiple processes on the same PC, and each process will have it's own Mongoose Web Server. We would like to setup a Reverse Proxy listening on port 80 to redirect all requests to the correct node process based on the Url. Those other server processes will be on ports 8080, 8081, etc. The URL Rewrite functionality works well for this using HTTP or HTTPs. I downloaded the Reverse Proxy sample program, and was able to use it to redirect the HTTP and HTTPS calls to my node processes. However, our client web apps need to make a Web Socket connection too, and this is where things get tricky. I have not been able to get the URL rewrite feature to redirect the websocket connections. Is this even possible? Is there a better way to do this that does not involve URL rewrite? As an example, here is the very simple rewrite rule I setup to try and redirect a particular URL to a different port:
ws://=ws://localhost:8080
Any suggestions would be appreciated

Sign In or Register to comment.