How to setup RewriteRule for web socket, for OnlyOffice?

#1
Greetings! I'm using openlightspeed as a proxy for the OnlyOffice Document Server. My current config:

Code:
extprocessor ds {
  type                    proxy
  address                 10.10.20.20:80
  maxConns                100
  pcKeepAliveTimeout      60
  initTimeout             60
  retryTimeout            0
  respBuffer              0
}

context / {
  type                    proxy
  handler                 ds
  addDefaultCharset       off
}

rewrite  {
  enable                  1
  autoLoadHtaccess        1
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteRule /(.*) http://ds/$1 [P]
RewriteRule ^/?(.*) "wss://${10.10.20.20}/$1" [P,L]
}
This is part of the configuration.

Everything worked well before the update. On the latest version implemented: Library for exchanging data with the server changed from sockjs to socket.io

Now it does not work through a proxy, it gives an error:
Browser cannot connect to wss://ds.oo.com /7.3.2-8/doc/2850524999/c/?EIO=4&transport=websocket

The developers recommended writing rules for Apache:
Code:
Rewrite Engine on 
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) "ws://backendserver-address/$1" [P,L]
ProxyPass / "http://backendserver-address/"
ProxyPassReverse / "http://backendserver-address/"
Can you please tell me how to create rules for Openlightspeed?
Thank you!
P.S. 10.10.20.20 is IP address OnlyOffice Document Server
 
Top