add LOCAL_DOMAIN config value
This commit is contained in:
parent
0d9504ca3b
commit
9eb7601f9d
2 changed files with 5 additions and 0 deletions
|
@ -7,6 +7,9 @@
|
||||||
# Note: predefined environment variables override the values specified here.
|
# 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
|
# IP address or hostname to bind to
|
||||||
BIND_ADDR=localhost
|
BIND_ADDR=localhost
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ pub struct Config {
|
||||||
pub bind_port: u16,
|
pub bind_port: u16,
|
||||||
pub database_url: String,
|
pub database_url: String,
|
||||||
pub jwt_secret: Vec<u8>,
|
pub jwt_secret: Vec<u8>,
|
||||||
|
pub local_domain: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Config {
|
impl Config {
|
||||||
|
@ -23,6 +24,7 @@ impl Config {
|
||||||
.expect("JWT_SECRET must be a 32-byte hex string")
|
.expect("JWT_SECRET must be a 32-byte hex string")
|
||||||
.as_str(),
|
.as_str(),
|
||||||
),
|
),
|
||||||
|
local_domain: env::var("LOCAL_DOMAIN").expect("LOCAL_DOMAIN not specified"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue