diff --git a/common/http-api-client/src/lib.rs b/common/http-api-client/src/lib.rs index 24abaa10ab..3f021f1d1d 100644 --- a/common/http-api-client/src/lib.rs +++ b/common/http-api-client/src/lib.rs @@ -895,20 +895,22 @@ impl Client { self.retry_limit = limit; } + #[cfg(feature = "tunneling")] fn matches_current_host(&self, url: &Url) -> bool { - if cfg!(feature = "tunneling") { - if let Some(ref front) = self.front - && front.is_enabled() - { - url.host_str() == self.current_url().front_str() - } else { - url.host_str() == self.current_url().host_str() - } + if let Some(ref front) = self.front + && front.is_enabled() + { + url.host_str() == self.current_url().front_str() } else { url.host_str() == self.current_url().host_str() } } + #[cfg(not(feature = "tunneling"))] + fn matches_current_host(&self, url: &Url) -> bool { + url.host_str() == self.current_url().host_str() + } + /// If multiple base urls are available rotate to next (e.g. when the current one resulted in an error) /// /// Takes an optional URL argument. If this is none, the current host will be updated automatically. diff --git a/common/upgrade-mode-check/src/attestation.rs b/common/upgrade-mode-check/src/attestation.rs index 3d052caadd..bd5fc9270b 100644 --- a/common/upgrade-mode-check/src/attestation.rs +++ b/common/upgrade-mode-check/src/attestation.rs @@ -97,6 +97,7 @@ pub async fn attempt_retrieve_attestation( let attestation = reqwest::ClientBuilder::new() .user_agent(user_agent.unwrap_or_else(|| nym_http_api_client::generate_user_agent!())) .timeout(std::time::Duration::from_secs(5)) + .no_hickory_dns() .build() .map_err(retrieval_failure)? .get(url)