mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-25 03:09:20 -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
|
CustomLog \${APACHE_LOG_DIR}/access.log combined
|
||||||
|
|
||||||
<Location /$sublocation/> #adjust here if necessary
|
<Location /$sublocation/> #adjust here if necessary
|
||||||
RewriteEngine On
|
ProxyPass http://<SERVER>:<SERVER_PORT>/$sublocation upgrade=websocket
|
||||||
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
|
|
||||||
|
|
||||||
ProxyPreserveHost Off
|
ProxyPreserveHost Off
|
||||||
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
|
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
|
||||||
RequestHeader setifempty Connection "Upgrade"
|
|
||||||
RequestHeader setifempty Upgrade "websocket"
|
|
||||||
</Location>
|
</Location>
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user