Hello,
This is my first post here, and unfortunately a bug report. I recently had to rebuild a large project and I decided to switch from NGINX to LSWS on all the web servers in the cluster. Part of this move was also using LSWS Web Socket proxy since it looked so promising.
However, it seems that if the browser does not send: "Upgrade Request" there will be no connection, at all.
This is specified in the LSWS panel:
Specifies the URI(s) that will use this WebSocket backend. Traffic to this URI will only be forwarded to the WebSocket backend when it contains a WebSocket upgrade request.
Traffic without this upgrade request will automatically be forwarded to the Context that this URI belongs to. If no Context exists for this URI, LSWS will treat this traffic as though it is accessing a static context with the location $DOC_ROOT/URI.
However... this is were it gets interesting, notice the line: Traffic without this upgrade request will automatically be forwarded to the Context that this URI belongs to.
This is not the case, because it doesn't work. Like at all, I tried all sorts of combinations and it simply does not work. Nothing to see in debug logs either, weirdly.
I would imagine the config should be like following:
1. I have your "main" web socket on "/"
2. I have a Context setup as Web Server Proxy on "/"
The result should be that traffic without the upgrade request to go the Web Server Proxy on the same path. But as I mentioned, that does not happen.
So I tried another approach...
1. Setup web socket proxy on "/main"
2. Setup normal web proxy on "/fallback"
And the result is the same... if the browser is old and does not send upgrade request, you just don't connect. This is crucial to me to fix, because I simply cannot have people not connecting to the server. I would like like to mention that I am using SSL, and without SSL is not an option.
Please advise on how should I make this part work:
Traffic without this upgrade request will automatically be forwarded to the Context that this URI belongs to.
So that I can still forward people to the web socket app server.
Your help is much appreciated.
This is my first post here, and unfortunately a bug report. I recently had to rebuild a large project and I decided to switch from NGINX to LSWS on all the web servers in the cluster. Part of this move was also using LSWS Web Socket proxy since it looked so promising.
However, it seems that if the browser does not send: "Upgrade Request" there will be no connection, at all.
This is specified in the LSWS panel:
Specifies the URI(s) that will use this WebSocket backend. Traffic to this URI will only be forwarded to the WebSocket backend when it contains a WebSocket upgrade request.
Traffic without this upgrade request will automatically be forwarded to the Context that this URI belongs to. If no Context exists for this URI, LSWS will treat this traffic as though it is accessing a static context with the location $DOC_ROOT/URI.
However... this is were it gets interesting, notice the line: Traffic without this upgrade request will automatically be forwarded to the Context that this URI belongs to.
This is not the case, because it doesn't work. Like at all, I tried all sorts of combinations and it simply does not work. Nothing to see in debug logs either, weirdly.
I would imagine the config should be like following:
1. I have your "main" web socket on "/"
2. I have a Context setup as Web Server Proxy on "/"
The result should be that traffic without the upgrade request to go the Web Server Proxy on the same path. But as I mentioned, that does not happen.
So I tried another approach...
1. Setup web socket proxy on "/main"
2. Setup normal web proxy on "/fallback"
And the result is the same... if the browser is old and does not send upgrade request, you just don't connect. This is crucial to me to fix, because I simply cannot have people not connecting to the server. I would like like to mention that I am using SSL, and without SSL is not an option.
Please advise on how should I make this part work:
Traffic without this upgrade request will automatically be forwarded to the Context that this URI belongs to.
So that I can still forward people to the web socket app server.
Your help is much appreciated.