Commit cace40cd authored by Thomas Citharel's avatar Thomas Citharel 🌲

allow cnames in attaching domains

Signed-off-by: Thomas Citharel's avatarThomas Citharel <tcit@tcit.fr>
parent a5b4427d
......@@ -65,6 +65,15 @@ class ConfigurationDomainValidator extends ConstraintValidator
private function validateDnsZone()
{
$domain = $this->domainObject->getDomainName();
$this->validateDnsZoneAction($domain);
}
private function validateDnsZoneAction($domain)
{
$cname = dns_get_record($domain, DNS_CNAME);
if ($cname && isset($cname[0]) && $cname[0]['type'] === 'CNAME') {
$this->validateDnsZoneAction($cname[0]['target']);
}
$ipv4 = dns_get_record($domain, DNS_A);
$ipv6 = dns_get_record($domain, DNS_AAAA);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment