mirror of
https://github.com/n0-computer/iroh.git
synced 2026-11-30 00:01:16 +00:00
support IROH_RELAY_ACME_URL env var
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user