Re: reverse proxying websocket connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 4, 2023 at 2:28 AM Helmut K. C. Tessarek
<tessarek@xxxxxxxxxxx> wrote:
>
> The documentation states:
>
> Proxying both HTTP and websockets at the same time, where the websockets URL's
> are not websocket-only or not known in advance can be done by using the
> RewriteRule directive to configure the websockets proxying:
>
> ProxyPass / http://example.com:9080/
> RewriteEngine on
> RewriteCond %{HTTP:Upgrade} websocket [NC]
> RewriteCond %{HTTP:Connection} upgrade [NC]
> RewriteRule ^/?(.*) "ws://example.com:9080/$1" [P,L]
>
> However, I was wondering, whether the following is an equivalent directive
> (just in a single line ;-)):
>
> ProxyPass / http://example.com:9080/ upgrade=websocket
>
> afaik the upgrade only takes place when it is requested by a header, unless
> upgrade=NONE or upgrade=ANY is set.
>
> Am I correct or are the not the same?

Yes, they should be the same. Upgrade only takes place when requested
AND accepted/switched by the backend server.


Regards;
Yann.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux