diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-04-18 00:08:46 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-04-18 00:08:46 -0400 |
commit | 95c29fd68cda5748d4e1cb3f02c5c7a0b202454b (patch) | |
tree | 29129d76a45d91dfedb24c90c161388e80739713 /src | |
parent | 6e8c700bccd5b3a5540f4ae303758858eeb40829 (diff) | |
download | rbw-95c29fd68cda5748d4e1cb3f02c5c7a0b202454b.tar.gz rbw-95c29fd68cda5748d4e1cb3f02c5c7a0b202454b.zip |
avoid generating urls with double slashes
apparently the official bitwarden server doesn't like it
Diffstat (limited to 'src')
-rw-r--r-- | src/config.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs index dbdf759..c6e0787 100644 --- a/src/config.rs +++ b/src/config.rs @@ -126,7 +126,7 @@ impl Config { pub fn base_url(&self) -> String { self.base_url.clone().map_or_else( || "https://api.bitwarden.com".to_string(), - |url| format!("{}/api", url), + |url| format!("{}/api", url.trim_end_matches('/')), ) } @@ -134,7 +134,7 @@ impl Config { self.identity_url.clone().unwrap_or_else(|| { self.base_url.clone().map_or_else( || "https://identity.bitwarden.com".to_string(), - |url| format!("{}/identity", url), + |url| format!("{}/identity", url.trim_end_matches('/')), ) }) } |