|
@ -255,6 +255,9 @@ pub struct Config { |
|
|
icon_cache_folder: String, |
|
|
icon_cache_folder: String, |
|
|
attachments_folder: String, |
|
|
attachments_folder: String, |
|
|
|
|
|
|
|
|
|
|
|
icon_cache_ttl: u64, |
|
|
|
|
|
icon_cache_negttl: u64, |
|
|
|
|
|
|
|
|
private_rsa_key: String, |
|
|
private_rsa_key: String, |
|
|
private_rsa_key_pem: String, |
|
|
private_rsa_key_pem: String, |
|
|
public_rsa_key: String, |
|
|
public_rsa_key: String, |
|
@ -304,6 +307,11 @@ impl Config { |
|
|
icon_cache_folder: get_env_or("ICON_CACHE_FOLDER", format!("{}/{}", &df, "icon_cache")), |
|
|
icon_cache_folder: get_env_or("ICON_CACHE_FOLDER", format!("{}/{}", &df, "icon_cache")), |
|
|
attachments_folder: get_env_or("ATTACHMENTS_FOLDER", format!("{}/{}", &df, "attachments")), |
|
|
attachments_folder: get_env_or("ATTACHMENTS_FOLDER", format!("{}/{}", &df, "attachments")), |
|
|
|
|
|
|
|
|
|
|
|
// icon_cache_ttl defaults to 30 days (30 * 24 * 60 * 60 seconds)
|
|
|
|
|
|
icon_cache_ttl: get_env_or("ICON_CACHE_TTL", 2592000u64), |
|
|
|
|
|
// icon_cache_negttl defaults to 3 days (3 * 24 * 60 * 60 seconds)
|
|
|
|
|
|
icon_cache_negttl: get_env_or("ICON_CACHE_NEGTTL", 259200u64), |
|
|
|
|
|
|
|
|
private_rsa_key: format!("{}.der", &key), |
|
|
private_rsa_key: format!("{}.der", &key), |
|
|
private_rsa_key_pem: format!("{}.pem", &key), |
|
|
private_rsa_key_pem: format!("{}.pem", &key), |
|
|
public_rsa_key: format!("{}.pub.der", &key), |
|
|
public_rsa_key: format!("{}.pub.der", &key), |
|
|