some changes
This commit is contained in:
1 parent
c5ca8e8d0b
commit
4edc511272
20 files changed
+686
-65
No files matched your search
@@ -58,6 +58,7 @@ pub struct Config {
|
||||
pub asset_version: String,
|
||||
pub asset_cache_max_age_seconds: u64,
|
||||
pub file_cache_max_age_seconds: u64,
|
||||
pub files_public_url: Option<String>,
|
||||
pub smtp: Option<crate::state::SmtpConfig>,
|
||||
pub registration_enabled: bool,
|
||||
pub account_confirmation_required: bool,
|
||||
@@ -83,6 +84,8 @@ impl Config {
|
||||
let unconfirmed_account_ttl_days =
|
||||
values.positive_i64("UNCONFIRMED_ACCOUNT_TTL_DAYS", 3)?;
|
||||
let files_dir = values.get("FILES_DIR", "data/files");
|
||||
let files_public_url =
|
||||
crate::file_urls::normalize_public_base(values.optional("FILES_PUBLIC_URL"))?;
|
||||
|
||||
let storage = match values
|
||||
.get("STORAGE_DRIVER", "local")
|
||||
@@ -172,6 +175,7 @@ impl Config {
|
||||
.nonnegative_u64("ASSET_CACHE_MAX_AGE_SECONDS", 600)?,
|
||||
file_cache_max_age_seconds: values
|
||||
.nonnegative_u64("FILE_CACHE_MAX_AGE_SECONDS", 600)?,
|
||||
files_public_url,
|
||||
smtp,
|
||||
registration_enabled: values.bool("REGISTRATION_ENABLED", false)?,
|
||||
account_confirmation_required: values.bool("ACCOUNT_CONFIRMATION_REQUIRED", false)?,
|
||||
|
||||
Reference in new issue
Block a user