support IROH_RELAY_ACME_URL env var

This commit is contained in:
Frando
2026-06-12 09:37:48 +02:00
parent 0b44cd336c
commit bc2b14b88f
+6 -1
View File
@@ -640,7 +640,12 @@ async fn load_cert_config(tls: &TlsConfig) -> Result<relay::CertConfig> {
.contact
.clone()
.std_context("LetsEncrypt needs a contact email")?;
let acme_config = AcmeConfig::letsencrypt(tls.prod_tls)
let acme_config = if let Ok(url) = std::env::var("IROH_RELAY_ACME_URL") {
AcmeConfig::new(url)
} else {
AcmeConfig::letsencrypt(tls.prod_tls)
};
let acme_config = acme_config
.domains(domains)
.contact(vec![format!("mailto:{contact}")])
.cache_path(tls.cert_dir());