diff --git a/.env.template b/.env.template index 0a7cbed3..1705cc80 100644 --- a/.env.template +++ b/.env.template @@ -77,10 +77,13 @@ # WEBSOCKET_PORT=3012 ## Enables push notifications (requires key and id from https://bitwarden.com/host) +## If you choose "European Union" Data Region, uncomment PUSH_RELAY_URI and PUSH_IDENTITY_URI then replace .com by .eu # PUSH_ENABLED=true # PUSH_INSTALLATION_ID=CHANGEME # PUSH_INSTALLATION_KEY=CHANGEME -# PUSH_RELAY_REGION=us +## Don't change this unless you know what you're doing. +# PUSH_RELAY_URI=https://push.bitwarden.com +# PUSH_IDENTITY_URI=https://identity.bitwarden.com ## Controls whether users are allowed to create Bitwarden Sends. ## This setting applies globally to all users. @@ -450,4 +453,4 @@ ## HaveIBeenPwned API Key, request it here: https://haveibeenpwned.com/API/Key # HIBP_API_KEY= -# vim: syntax=ini +# vim: syntax=ini \ No newline at end of file diff --git a/src/config.rs b/src/config.rs index 900c85d0..4b382ee5 100644 --- a/src/config.rs +++ b/src/config.rs @@ -380,26 +380,10 @@ make_config! { push { /// Enable push notifications push_enabled: bool, false, def, false; - /// Push relay region - push_relay_region: String, false, def, "us".to_string(); /// Push relay uri - push_relay_uri: String, false, auto, |c| { - let push_relay_uri = match c.push_relay_region.as_str() { - "us" => "https://push.bitwarden.com".to_string(), - "eu" => "https://push.bitwarden.eu".to_string(), - _ => "https://push.bitwarden.com".to_string(), // Default to "us" region - }; - push_relay_uri - }; + push_relay_uri: String, false, def, "https://push.bitwarden.com".to_string(); /// Push identity uri - push_identity_uri: String, false, auto, |c| { - let push_identity_uri = match c.push_relay_region.as_str() { - "us" => "https://identity.bitwarden.com".to_string(), - "eu" => "https://identity.bitwarden.eu".to_string(), - _ => "https://identity.bitwarden.com".to_string(), // Default to "us" region - }; - push_identity_uri - }; + push_identity_uri: String, false, def, "https://identity.bitwarden.com".to_string(); /// Installation id |> The installation id from https://bitwarden.com/host push_installation_id: Pass, false, def, String::new(); /// Installation key |> The installation key from https://bitwarden.com/host