AI review fixes

This commit is contained in:
Matej Bačo committed 2025-09-12 14:48:56 +02:00
1 parent b4a49107f1
commit 3e905f9d6b
2 files changed
+5 -13

No files matched your search

+1 -1
View File
@@ -21,7 +21,7 @@ _APP_OPTIONS_ROUTER_PROTECTION=disabled
_APP_OPTIONS_FORCE_HTTPS=disabled
_APP_OPTIONS_ROUTER_FORCE_HTTPS=disabled
_APP_OPENSSL_KEY_V1=your-secret-key
_APP_DNS=8.8.8.8,1.1.1.1
_APP_DNS=8.8.8.8,1.1.1.1
_APP_DOMAIN=traefik
_APP_CONSOLE_DOMAIN=localhost
_APP_DOMAIN_FUNCTIONS=functions.localhost
+4 -12
View File
@@ -18,17 +18,15 @@ class DNS extends Validator
protected const FAILURE_REASON_INTERNAL = 'Internal error occurred.';
protected const FAILURE_REASON_UNKNOWN = '';
protected static string $regionVerbose = ''; // Useful when overriding in multi-region environments
/**
* @var mixed
*/
protected mixed $logs;
protected mixed $logs = [];
/**
* @var array<string>
*/
protected array $dnsServers;
protected array $dnsServers = [];
protected string $domain = '';
protected string $resolver = '';
@@ -61,13 +59,7 @@ class DNS extends Validator
$messages = [];
$region = self::$regionVerbose;
if (!empty($region)) {
$messages[] = "Verification of DNS records failed with DNS resolver {$this->resolver} in {$region} region";
} else {
$messages[] = "Verification of DNS records failed with DNS resolver {$this->resolver}";
}
$messages[] = "Verification of DNS records failed with DNS resolver {$this->resolver}";
if ($this->count === 0) {
$messages[] = 'Domain ' . $this->domain . ' does not have ' . $this->type . ' record';
@@ -169,7 +161,7 @@ class DNS extends Validator
\array_shift($parts);
$parentDomain = \implode('.', $parts);
$validator = new DNS($this->target, DNS::RECORD_CAA, $dnsServer);
return $validator->isValid($parentDomain, $dnsServer);
return $validator->isValidWithDNSServer($parentDomain, $dnsServer);
}
return false;