With send support, proxy setup examples should be updated #1007

Closed
opened 2026-02-04 23:36:55 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @swstim on GitHub (Apr 7, 2021).

I mentioned this in discussions, but I think it's important enough to post again here:

Now with send support, the Apache reverse proxy suggested setup should be updated.
I have tested and now use the following mod_rewrite config:

    RewriteEngine On
    RewriteCond %{HTTP:Upgrade} websocket [NC]
    RewriteCond %{HTTP:Connection} upgrade [NC]
    RewriteRule ^/?(.*) "ws://127.0.0.1:3012/$1" [P,L]

This should also be more future proof then specifying a specific path eg /notifications/hub(.*).

Originally posted by @swstim in https://github.com/dani-garcia/bitwarden_rs/discussions/1230#discussioncomment-532785

Originally created by @swstim on GitHub (Apr 7, 2021). I mentioned this in discussions, but I think it's important enough to post again here: Now with send support, the [Apache reverse proxy suggested setup](https://github.com/dani-garcia/bitwarden_rs/wiki/Proxy-examples) should be updated. I have tested and now use the following mod_rewrite config: ``` RewriteEngine On RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteCond %{HTTP:Connection} upgrade [NC] RewriteRule ^/?(.*) "ws://127.0.0.1:3012/$1" [P,L] ``` This should also be more future proof then specifying a specific path eg `/notifications/hub(.*)`. _Originally posted by @swstim in https://github.com/dani-garcia/bitwarden_rs/discussions/1230#discussioncomment-532785_
Author
Owner

@pepa65 commented on GitHub (Apr 7, 2021):

How about the recommended Caddy2 config??

@pepa65 commented on GitHub (Apr 7, 2021): How about the recommended Caddy2 config??
Author
Owner

@jjlin commented on GitHub (Apr 7, 2021):

First, this is not a software issue; please follow the instructions given when opening issues. Second, wiki pages can be updated by anyone logged into GitHub, so you can make updates yourself.

That said, Send support doesn't require any changes to the reverse proxy config, so I'm not sure why you seem to think it does. While the existing example in the wiki seems like it should work as is, neither it nor your proposed update are optimal. Since /notifications/hub is the only WebSocket path, using ProxyPassMatch as shown in https://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html should be the simplest and most efficient.

@jjlin commented on GitHub (Apr 7, 2021): First, this is not a software issue; please follow the instructions given when opening issues. Second, wiki pages can be updated by anyone logged into GitHub, so you can make updates yourself. That said, Send support doesn't require any changes to the reverse proxy config, so I'm not sure why you seem to think it does. While the existing example in the wiki seems like it should work as is, neither it nor your proposed update are optimal. Since `/notifications/hub` is the only WebSocket path, using `ProxyPassMatch` as shown in https://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html should be the simplest and most efficient.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#1007