Skip to content

Commit

Permalink
Update CustomHostnames.php
Browse files Browse the repository at this point in the history
add certificate_authority parameter for issue/update SSL custom hostname
  • Loading branch information
fhferreira authored Sep 9, 2024
1 parent fdfc656 commit 62d4d92
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Endpoints/CustomHostnames.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ public function addHostname(
$options['ssl']['custom_certificate'] = $customSsl['certificate'];
}

if (!empty($customSsl['certificate_authority'])) {
$options['ssl']['custom_certificate'] = $customSsl['certificate_authority'];
}

$zone = $this->adapter->post('zones/'.$zoneID.'/custom_hostnames', $options);
$this->body = json_decode($zone->getBody());
return $this->body->result;
Expand Down Expand Up @@ -199,6 +203,10 @@ public function updateHostname(
$query['custom_certificate'] = $customSsl['certificate'];
}

if (!empty($customSsl['certificate_authority'])) {
$query['custom_certificate'] = $customSsl['certificate_authority'];
}

if (!empty($query)) {
$options = [
'ssl' => $query
Expand Down

0 comments on commit 62d4d92

Please sign in to comment.