summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorBlockListed <[email protected]>2023-02-07 18:34:47 +0100
committerBlockListed <[email protected]>2023-02-07 18:42:36 +0100
commit5d1c11ceba3826b5ae000d9a4d8c0ec7e094428c (patch)
tree3f1e88b5ad38d253db338f138d67acec867a9c99 /src/config.rs
parenta2aa7c9bc23145f0f5db72f8aeed826902c86fde (diff)
downloadvaultwarden-5d1c11ceba3826b5ae000d9a4d8c0ec7e094428c.tar.gz
vaultwarden-5d1c11ceba3826b5ae000d9a4d8c0ec7e094428c.zip
fix trailing slash in configuration builder
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 46deed54..42a75ca2 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -141,6 +141,14 @@ macro_rules! make_config {
)+)+
config.domain_set = _domain_set;
+ if config.domain_set {
+ if config.domain.ends_with('/') {
+ println!("[WARNING] The configured domain ends with a trailing slash.");
+ println!("[WARNING] The trailing slash is getting removed.");
+ config.domain = config.domain.trim_end_matches('/').to_string();
+ }
+ }
+
config.signups_domains_whitelist = config.signups_domains_whitelist.trim().to_lowercase();
config.org_creation_users = config.org_creation_users.trim().to_lowercase();