add LOCAL_DOMAIN config value

This commit is contained in:
anna 2022-12-25 18:33:32 +01:00
parent 0d9504ca3b
commit 9eb7601f9d
Signed by: fef
GPG key ID: EC22E476DC2D3D84
2 changed files with 5 additions and 0 deletions

View file

@ -7,6 +7,9 @@
# Note: predefined environment variables override the values specified here.
#
# Domain name of this instance (the domain.tld part in @username@domain.tld)
LOCAL_DOMAIN=
# IP address or hostname to bind to
BIND_ADDR=localhost

View file

@ -6,6 +6,7 @@ pub struct Config {
pub bind_port: u16,
pub database_url: String,
pub jwt_secret: Vec<u8>,
pub local_domain: String,
}
impl Config {
@ -23,6 +24,7 @@ impl Config {
.expect("JWT_SECRET must be a 32-byte hex string")
.as_str(),
),
local_domain: env::var("LOCAL_DOMAIN").expect("LOCAL_DOMAIN not specified"),
}
}
}