mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 12:37:00 +01:00
fix(daemon): handling IPv6 addresses in healthcheck (#3004)
* fix(daemon): handling IPv6 addresses propertly in healthcheck Fixes #3002
This commit is contained in:
parent
0e352cf47c
commit
413ef9210a
|
@ -1,4 +1,4 @@
|
||||||
bindaddress = "127.0.0.1:8443"
|
bindaddress = "[::]:8443"
|
||||||
ldapbindaddress = "127.0.0.1:3636"
|
ldapbindaddress = "127.0.0.1:3636"
|
||||||
|
|
||||||
db_fs_type = "zfs"
|
db_fs_type = "zfs"
|
||||||
|
|
|
@ -1044,10 +1044,16 @@ async fn kanidm_main(
|
||||||
|
|
||||||
let healthcheck_url = match &sopt.check_origin {
|
let healthcheck_url = match &sopt.check_origin {
|
||||||
true => format!("{}/status", config.origin),
|
true => format!("{}/status", config.origin),
|
||||||
false => format!("https://{}/status", config.address),
|
false => {
|
||||||
|
// the replace covers when you specify an ipv6-capable "all" address
|
||||||
|
format!(
|
||||||
|
"https://{}/status",
|
||||||
|
config.address.replace("[::]", "localhost")
|
||||||
|
)
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
debug!("Checking {healthcheck_url}");
|
info!("Checking {healthcheck_url}");
|
||||||
|
|
||||||
let mut client = reqwest::ClientBuilder::new()
|
let mut client = reqwest::ClientBuilder::new()
|
||||||
.danger_accept_invalid_certs(!sopt.verify_tls)
|
.danger_accept_invalid_certs(!sopt.verify_tls)
|
||||||
|
|
Loading…
Reference in a new issue