Welcome! Log In Create A New Profile

Advanced

Re: Websocket proxying based on Sec-Websocket-Protocol

Maxim Dounin
March 19, 2013 09:36AM
Hello!

On Tue, Mar 19, 2013 at 06:32:04AM -0400, gvag wrote:

> Hi guys,
>
> I am trying to find if it is possible to proxy a websocket request based on
> the Sec-Websocket-Protocol. More specific, is there a way to check the
> Sec-Websocket-Protocol (http://tools.ietf.org/html/rfc6455#section-11.3.4)
> header and proxy to the appropriate host/port according to this header?
>
> A use case would be to proxy to a SIP Connector -SIP Websocket connector-
> (specific host and port) when the Sec-Websocket-Protocol = sip.
> (http://tools.ietf.org/html/draft-ietf-sipcore-sip-websocket-03)
>
> I checked documentation and forums, but i cannot find any information
> relevant to this issue. As far as i can see the Sec-Websocket-Protocol
> header is not available to be used in the nginx, just the "Upgrade:
> websocket" header.

You may check Sec-Websocket-Protocol using
$http_sec_websocket_protocol variable (see [1]) and route requests
accordingly. This isn't specific to websockets and hence not
something discussed in websockets context.

[1] http://nginx.org/en/docs/http/ngx_http_core_module.html#variables

--
Maxim Dounin
http://nginx.org/en/donation.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Websocket proxying based on Sec-Websocket-Protocol

gvag March 19, 2013 06:32AM

Re: Websocket proxying based on Sec-Websocket-Protocol

Maxim Dounin March 19, 2013 09:36AM

Re: Websocket proxying based on Sec-Websocket-Protocol

gvag March 19, 2013 10:48AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 142
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready