mirror of
https://github.com/nitnelave/lldap.git
synced 2023-04-12 14:25:13 +00:00
refactor: align http vars
This commit is contained in:
parent
3deb3705bf
commit
f4adfe5e97
@ -15,8 +15,8 @@
|
||||
#ldap_port = 3890
|
||||
|
||||
## The host address that the HTTP server will be bound to.
|
||||
## To enable IPv6 support, simply switch "api_host" to "::1":
|
||||
#api_host = "0.0.0.0"
|
||||
## To enable IPv6 support, simply switch "http_host" to "::1":
|
||||
#http_host = "0.0.0.0"
|
||||
|
||||
## The port on which to have the HTTP server, for user login and
|
||||
## administration.
|
||||
|
@ -63,8 +63,8 @@ pub struct RunOpts {
|
||||
pub ldap_port: Option<u16>,
|
||||
|
||||
/// Change HTTP API host. Default: "0.0.0.0"
|
||||
#[clap(long, env = "LLDAP_API_HOST")]
|
||||
pub api_host: Option<String>,
|
||||
#[clap(long, env = "LLDAP_HTTP_HOST")]
|
||||
pub http_host: Option<String>,
|
||||
|
||||
/// Change HTTP API port. Default: 17170
|
||||
#[clap(long, env = "LLDAP_HTTP_PORT")]
|
||||
|
@ -69,7 +69,7 @@ pub struct Configuration {
|
||||
#[builder(default = "3890")]
|
||||
pub ldap_port: u16,
|
||||
#[builder(default = r#"String::from("0.0.0.0")"#)]
|
||||
pub api_host: String,
|
||||
pub http_host: String,
|
||||
#[builder(default = "17170")]
|
||||
pub http_port: u16,
|
||||
#[builder(default = r#"SecUtf8::from("secretjwtsecret")"#)]
|
||||
|
@ -131,7 +131,7 @@ where
|
||||
server_builder
|
||||
.bind(
|
||||
"http",
|
||||
(config.api_host.clone(), config.http_port),
|
||||
(config.http_host.clone(), config.http_port),
|
||||
move || {
|
||||
let backend_handler = backend_handler.clone();
|
||||
let jwt_secret = jwt_secret.clone();
|
||||
|
Loading…
Reference in New Issue
Block a user