Remove apex zone check

This commit is contained in:
Brian Picciano 2023-08-04 15:02:47 +02:00
parent 92f7d3d52a
commit 36052de0c1
2 changed files with 2 additions and 6 deletions

View File

@ -253,7 +253,6 @@ impl Service {
dns_records: &'a [service::ConfigDNSRecord], dns_records: &'a [service::ConfigDNSRecord],
challenge_token: String, challenge_token: String,
domain_is_zone_apex: bool,
dns_records_have_cname: 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 { let dns_records_have_cname = self.config.dns_records.iter().any(|r| match r {
service::ConfigDNSRecord::CNAME { .. } => true, service::ConfigDNSRecord::CNAME { .. } => true,
_ => false, _ => false,
@ -297,7 +294,6 @@ impl Service {
dns_records: &self.config.dns_records, dns_records: &self.config.dns_records,
challenge_token: settings_hash, challenge_token: settings_hash,
domain_is_zone_apex,
dns_records_have_cname, dns_records_have_cname,
}, },
) )

View File

@ -58,11 +58,11 @@ query for your domain name. It can be <strong>one or more of</strong>:</p>
{{ /each }} {{ /each }}
</table> </table>
{{ #if data.domain_is_zone_apex }}{{ #if data.dns_records_have_cname }} {{ #if data.dns_records_have_cname }}
<p>(Please note that not all DNS providers support putting a CNAME at the zone <p>(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 apex, while others support it via an alternative record type like ALIAS or
ANAME.)</p> ANAME.)</p>
{{ /if }}{{ /if }} {{ /if }}
<p>Once both entries are installed, you can hit the following button to check <p>Once both entries are installed, you can hit the following button to check
your configuration and set up your domain.</p> your configuration and set up your domain.</p>