作者 lyh

gx

... ... @@ -77,7 +77,11 @@ class DomainInfo extends Command
public function updatePrivate($param)
{
$url = 'https://' . $param['domain']. '/api/applySsl/';
$extend_config = json_decode($param['extend_config'], true);
if(!empty($param['extend_config'])){
$extend_config = json_decode($param['extend_config'], true);
}else{
$extend_config = [];
}
$top_domain = $this->getTopDomain($param['domain']);
if ((empty($extend_config) || empty($extend_config[0]['origin'])) && $param['id'] != 3) {
$extend_config = [
... ... @@ -89,7 +93,7 @@ class DomainInfo extends Command
'type' => 1,
'route' => 1,
"domain" =>$param['domain'],
"rewrite"=> $extend_config,
"rewrite"=> $extend_config ?? [],
'other_domain' => [$top_domain, '*.' . $top_domain],
'private_key' => '',
'cert' => ''
... ...