From 36052de0c13346a4a75f9336fcb81ad45c84e9ea Mon Sep 17 00:00:00 2001
From: Brian Picciano
Date: Fri, 4 Aug 2023 15:02:47 +0200
Subject: [PATCH] Remove apex zone check
---
src/service/http.rs | 4 ----
src/service/http/tpl/domain_init.html | 4 ++--
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/service/http.rs b/src/service/http.rs
index d023a62..7923596 100644
--- a/src/service/http.rs
+++ b/src/service/http.rs
@@ -253,7 +253,6 @@ impl Service {
dns_records: &'a [service::ConfigDNSRecord],
challenge_token: String,
- domain_is_zone_apex: bool,
dns_records_have_cname: bool,
}
@@ -274,8 +273,6 @@ impl Service {
}
};
- // TODO this is wrong, e.g. something.co.uk
- let domain_is_zone_apex = args.domain.as_rr().num_labels() == 2;
let dns_records_have_cname = self.config.dns_records.iter().any(|r| match r {
service::ConfigDNSRecord::CNAME { .. } => true,
_ => false,
@@ -297,7 +294,6 @@ impl Service {
dns_records: &self.config.dns_records,
challenge_token: settings_hash,
- domain_is_zone_apex,
dns_records_have_cname,
},
)
diff --git a/src/service/http/tpl/domain_init.html b/src/service/http/tpl/domain_init.html
index 501bd7a..c23a40b 100644
--- a/src/service/http/tpl/domain_init.html
+++ b/src/service/http/tpl/domain_init.html
@@ -58,11 +58,11 @@ query for your domain name. It can be one or more of:
{{ /each }}
-{{ #if data.domain_is_zone_apex }}{{ #if data.dns_records_have_cname }}
+{{ #if data.dns_records_have_cname }}
(Please note that not all DNS providers support putting a CNAME at the zone
apex, while others support it via an alternative record type like ALIAS or
ANAME.)
-{{ /if }}{{ /if }}
+{{ /if }}
Once both entries are installed, you can hit the following button to check
your configuration and set up your domain.