[undertow-dev] Reverse proxy Websocket connections

Stuart Douglas sdouglas at redhat.com
Sun May 21 17:41:42 EDT 2017


On Sun, May 21, 2017 at 6:01 AM, Eldad Rudich <eldadru at gmail.com> wrote:
> Hi,
>
> I have a custom reverse proxy that based on Undertow, my server uses
> undertow's handlers to receive HTTP request, convert them to my custom
> protocol and send them to another component in my system that talks to the
> actual web server and return the responses.
>
>
> I would like to also support WebSocket requests, is it possible to support
> WebSockets handlers with the same prefix path of the HTTP handler? ( or use
> the same handler for both regular HTTP request and WebSockets connection)


You can. You ned to look for a 101 (switching protocols) response,
check the headers to determine that it is a web socket upgrade, and
then figure out how your custom protocol is going to handle it.

Stuart

>
> Best,
> Eldad
>
>
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev


More information about the undertow-dev mailing list