PR review changes
This commit is contained in:
parent
5bd106afaf
commit
f4a4cfa207
|
@ -305,7 +305,7 @@ App::patch('/v1/proxy/rules/:ruleId/verification')
|
|||
$log->addExtra('dnsTiming', \strval(\microtime(true) - $validationStart));
|
||||
$log->addTag('dnsDomain', $domain->get());
|
||||
|
||||
$error = $validator->getDnsResponse();
|
||||
$error = $validator->getLogs();
|
||||
$log->addExtra('dnsResponse', \is_array($error) ? \json_encode($error) : \strval($error));
|
||||
|
||||
throw new Exception(Exception::RULE_VERIFICATION_FAILED);
|
||||
|
|
|
@ -9,7 +9,7 @@ class CNAME extends Validator
|
|||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
protected mixed $dnsResponse;
|
||||
protected mixed $logs;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
|
@ -35,9 +35,9 @@ class CNAME extends Validator
|
|||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getDnsResponse(): mixed
|
||||
public function getLogs(): mixed
|
||||
{
|
||||
return $this->dnsResponse;
|
||||
return $this->logs;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -55,7 +55,7 @@ class CNAME extends Validator
|
|||
|
||||
try {
|
||||
$records = \dns_get_record($domain, DNS_CNAME);
|
||||
$this->dnsResponse = $records;
|
||||
$this->logs = $records;
|
||||
} catch (\Throwable $th) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -280,7 +280,7 @@ class Certificates extends Action
|
|||
$log->addExtra('dnsTiming', \strval(\microtime(true) - $validationStart));
|
||||
$log->addTag('dnsDomain', $domain->get());
|
||||
|
||||
$error = $validator->getDnsResponse();
|
||||
$error = $validator->getLogs();
|
||||
$log->addExtra('dnsResponse', \is_array($error) ? \json_encode($error) : \strval($error));
|
||||
|
||||
throw new Exception('Failed to verify domain DNS records.');
|
||||
|
|
Loading…
Reference in a new issue