mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-09 09:13:02 +03:00
Can't get websockets to work #2088
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 @poblabs on GitHub.
I'm using the latest version of bitwarden_rs (Version: 1.9.1-3fb63bbe) and my vault is working but I've noticed the instant sync from browser to browser is not working. I know mobile is not in scope.
I've followed the Wiki entry for enabling websockets. I've followed the Wiki entry for the Proxy examples (my use case is nginx). I have the proxy headers in place:
In my Synology Docker instance I have port 3012 mapped, and
WEBSOCKET_ENABLEDset totrue.All the endpoints within the reverse proxy are working except
/notifications/hub. This returns an NGINX error502 Bad Gateway, which is coming from my proxy.So perhaps it's not listening to HTTP requests, which led me to check my Chrome console and I get these errors.
If I GET that HTTP location,
/notifications/hub/negotiateI see something although the image doesn't load. I think this tells me that my proxy rules for this endpoint are working.I'm not quite sure where to go from here. Thoughts?
@tanst commented on GitHub:
Your answer is here: https://github.com/dani-garcia/bitwarden_rs/issues/500#issuecomment-498805138
@poblabs commented on GitHub:
@tanst I'm not so sure that's my answer (I had said upfront that I knew mobile was out of scope)
@mprasil Here you go. I've truncated out all 80 to 443 forwarding and SSL Let's Encrypt stuff. That's pretty standard. If you want to see it I can add it.
One thing I've noticed is that I need the trailing slash on the
proxy_passif the location is not/. Which is why you see that. I'm open to trying anything that's suggested.Does the order of the locations matter within the proxy config?
EDIT: For giggles I moved the location for
/notifications/hub/negotiateupwards in the list and it made no difference.@mprasil commented on GitHub:
Can you share relevant parts of nginx config? It seems like there is some issue routing
/notifications/hub/negotiateor something around that.@mprasil commented on GitHub:
I think you have extra slash at the end in the
proxy_passfor the/notifications/hub/negotiateendpoint?@poblabs commented on GitHub:
That was the fix. I could have sworn I tried it without that trailing slash. A bunch of my other proxy
locationsactually require the trailing slash otherwise the endpoints get concatenated (there's some nginx documentation on the trailing slash).Anyways, thanks for the sanity check. Initial tests are working.