Skip to content

Commit

Permalink
fix trailing slash in configuration builder
Browse files Browse the repository at this point in the history
  • Loading branch information
BlockListed committed Feb 7, 2023
1 parent 583fa1b commit 2a2ed98
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 2a2ed98

Please sign in to comment.