mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-22 01:39:21 -07:00
Use websocket upgrade capability in apache > 2.4.47 which has been released in 2021, removing unecessary rewrite magic.
@@ -512,16 +512,10 @@ On some OS's you can use a2enmod, for example with: `a2enmod proxy_wstunnel` and
|
||||
CustomLog \${APACHE_LOG_DIR}/access.log combined
|
||||
|
||||
<Location /$sublocation/> #adjust here if necessary
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTP:Upgrade} =websocket [NC]
|
||||
RewriteRule /notifications/hub(.*) ws://<SERVER>:<SERVER_PORT>/$sublocation/notifications/hub/$1 [P,L]
|
||||
RewriteRule /notifications/anonymous-hub(.*) ws://<SERVER>:<SERVER_PORT>/fjbitwarden/notifications/anonymous-hub/$1 [P,L]
|
||||
ProxyPass http://<SERVER>:<SERVER_PORT>/$sublocation
|
||||
ProxyPass http://<SERVER>:<SERVER_PORT>/$sublocation upgrade=websocket
|
||||
|
||||
ProxyPreserveHost Off
|
||||
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
|
||||
RequestHeader setifempty Connection "Upgrade"
|
||||
RequestHeader setifempty Upgrade "websocket"
|
||||
</Location>
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user