server: make host configurable to enable IPv6 support

This change also separates the API host and the LDAP host for further customization.
This commit is contained in:
Waldemar Heinze
2022-11-24 23:39:11 +01:00
committed by GitHub
parent dd7e392626
commit 2668ea4553
5 changed files with 59 additions and 27 deletions

View File

@@ -64,8 +64,12 @@ impl std::default::Default for LdapsOptions {
#[derive(Clone, Debug, Deserialize, Serialize, derive_builder::Builder)]
#[builder(pattern = "owned", build_fn(name = "private_build"))]
pub struct Configuration {
#[builder(default = r#"String::from("0.0.0.0")"#)]
pub ldap_host: String,
#[builder(default = "3890")]
pub ldap_port: u16,
#[builder(default = r#"String::from("0.0.0.0")"#)]
pub http_host: String,
#[builder(default = "17170")]
pub http_port: u16,
#[builder(default = r#"SecUtf8::from("secretjwtsecret")"#)]