mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-02-24 19:07:44 +03:00
apache reverse proxy configuration needs more headers? #331
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Alixerid on GitHub (Jul 11, 2019).
I am running bitwarden_rs behind an apache reverse proxy and used the example configuration from the wiki. Still, the websocket requests didn't work and produced errors such as the following in the apache error log:
After searching and reading a bit it seemed to me that bitwarden_rs needed to get the headers
ConnectionandUpgradeforwarded by the proxy as well. That's actually stated on the wiki page for enabling websockets:Then I found how to do this with apache and added this to my configuration:
Now my setup works with websocket.
Should these 2 lines be added to the example config? Or does someone know better and can explain why it only worked for me when adding these lines?
@fbartels commented on GitHub (Jul 11, 2019):
Hi,
normally these headers are already set by the browser when he wants to make a websocket connection. Do you have the websocket proxy module of Apache activated? Do you have another reverse proxy Infront of this one?
@Alixerid commented on GitHub (Jul 12, 2019):
Yes,
proxy_wstunnelis enabled and I do not have another proxy in front of this apache.The client (browser) should set the header, but does the apache proxy forward these headers to the backend by default? I'm no expert but I thought that I was fixing that part of forwarding the headers to bitwarden_rs.
@fbartels commented on GitHub (Jul 12, 2019):
Strange.. well I don't think it hurts for you to force these headers, but it feels like something is wrong with your browser.
While I don't know the code behind this in bitwarden_rs I don't think that these headers actually need to get to the backend. The important part is that the connection is once upgraded to a websocket and this is what happens within the (apache) webserver.
@Alixerid commented on GitHub (Jul 18, 2019):
Well, my setup is running fine with these header directives for now. Maybe someone who knows more about the code can shed some light on what is required by the backend (i.e. bitwarden_rs).
@dani-garcia commented on GitHub (May 14, 2020):
Closed due to inactivity.