1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-08-25 12:13:19 +00:00

Merge branch 'master' into misc-updates

This commit is contained in:
Mathijs van Veluw 2021-02-03 22:22:06 +01:00 committed by GitHub
commit ecb46f591c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 566 additions and 283 deletions

View file

@ -19,13 +19,12 @@ static SHOW_WEBSOCKETS_MSG: AtomicBool = AtomicBool::new(true);
#[get("/hub")]
fn websockets_err() -> EmptyResult {
if CONFIG.websocket_enabled() && SHOW_WEBSOCKETS_MSG.compare_and_swap(true, false, Ordering::Relaxed) {
err!(
"###########################################################
if CONFIG.websocket_enabled() && SHOW_WEBSOCKETS_MSG.compare_exchange(true, false, Ordering::Relaxed, Ordering::Relaxed).is_ok() {
err!("
###########################################################
'/notifications/hub' should be proxied to the websocket server or notifications won't work.
Go to the Wiki for more info, or disable WebSockets setting WEBSOCKET_ENABLED=false.
###########################################################################################"
)
###########################################################################################\n")
} else {
Err(Error::empty())
}
@ -161,7 +160,7 @@ impl WSHandler {
}
}
};
// Otherwise verify the query parameter value
let path = hs.request.resource();
if let Some(params) = path.split('?').nth(1) {