diff --git a/src/Endpoints/CustomHostnames.php b/src/Endpoints/CustomHostnames.php index 6e4281e..811b833 100644 --- a/src/Endpoints/CustomHostnames.php +++ b/src/Endpoints/CustomHostnames.php @@ -55,9 +55,9 @@ class CustomHostnames implements API 'ssl' => [ 'method' => $sslMethod, 'type' => $sslType, - 'settings' => $sslSettings + 'settings' => $sslSettings, + 'wildcard' => $wildcard, ], - 'wildcard' => $wildcard, ]; if (!empty($customOriginServer)) { @@ -65,15 +65,15 @@ class CustomHostnames implements API } if (empty($bundleMethod) === false) { - $options['bundle_method'] = $bundleMethod; + $options['ssl']['bundle_method'] = $bundleMethod; } if (empty($customKey) === false) { - $options['custom_key'] = $customKey; + $options['ssl']['custom_key'] = $customKey; } if (empty($customCertificate) === false) { - $options['custom_certificate'] = $customCertificate; + $options['ssl']['custom_certificate'] = $customCertificate; } $zone = $this->adapter->post('zones/'.$zoneID.'/custom_hostnames', $options); diff --git a/tests/Endpoints/CustomHostnamesTest.php b/tests/Endpoints/CustomHostnamesTest.php index 5c19ccf..c19c286 100644 --- a/tests/Endpoints/CustomHostnamesTest.php +++ b/tests/Endpoints/CustomHostnamesTest.php @@ -85,13 +85,13 @@ CERTIFICATE; 'settings' => [ 'http2' => 'on', 'http3' => 'on', - 'min_tls_version' => '1.2' - ] + 'min_tls_version' => '1.2', + ], + 'bundle_method' => 'optimal', + 'custom_key' => $customKey, + 'custom_certificate' => $customCertificate, + 'wildcard' => true, ], - 'bundle_method' => 'optimal', - 'custom_key' => $customKey, - 'custom_certificate' => $customCertificate, - 'wildcard' => true, ]) );