作者 刘锟

合并分支 'akun' 到 'master'

Akun



查看合并请求 !672
... ... @@ -153,7 +153,7 @@ class DomainInfo extends Command
$servers_ip_info = $serverIpModel->read(['id' => $project_info['serve_id']], ['servers_id']);
if ($servers_ip_info && $servers_ip_info['servers_id'] != ServerConfig::SELF_SITE_ID) {
//非自建站项目,申请免费证书
$this->updateAmpPrivate($v['domain']);
$this->updateAmpPrivate($v);
$ssl_new = $this->updateDomainSsl($v['domain']);
$ssl_new['from'] && $data['certificate_start_time'] = $ssl_new['from'];
... ... @@ -212,24 +212,27 @@ class DomainInfo extends Command
"rewrite" => $param['extend_config'],
'other_domain' => $param['other_domain'],
'is_https' => $param['is_https'],
'not_allow_country' => $param['not_allow_country'],
'not_allow_ip' => $param['not_allow_ip'],
'amp_status' => $param['amp_status']
];
return $this->curlRequest($url, $param);
}
/**
* 更新amp站证书
* @param $domain
* @param $param
* @return array
* @author Akun
* @date 2024/02/26 10:25
*/
public function updateAmpPrivate($domain)
public function updateAmpPrivate($param)
{
$url = 'https://' . $domain . '/api/createSiteAmp/';
$url = 'https://' . $param['domain'] . '/api/createSiteAmp/';
$param = [
"domain" => $domain,
'private_key' => '',
'cert' => ''
"domain" => $param['domain'],
'not_allow_country' => $param['not_allow_country'],
'not_allow_ip' => $param['not_allow_ip'],
];
return $this->curlRequest($url, $param);
}
... ...
... ... @@ -74,7 +74,8 @@ class EditDomainBt implements ShouldQueue
'other_domain' => $domain_info['other_domain'],
'is_https' => $domain_info['is_https'],
'not_allow_country' => $domain_info['not_allow_country'],
'not_allow_ip' => $domain_info['not_allow_ip']
'not_allow_ip' => $domain_info['not_allow_ip'],
'amp_status' => $domain_info['amp_status']
];
} else {
$api_url = 'http://' . $server_info['domain'] . '/api/applySsl';
... ... @@ -84,7 +85,8 @@ class EditDomainBt implements ShouldQueue
'other_domain' => $domain_info['other_domain'],
'is_https' => $domain_info['is_https'],
'not_allow_country' => $domain_info['not_allow_country'],
'not_allow_ip' => $domain_info['not_allow_ip']
'not_allow_ip' => $domain_info['not_allow_ip'],
'amp_status' => $domain_info['amp_status']
];
}
... ...