|
...
|
...
|
@@ -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);
|
|
|
|
}
|
...
|
...
|
|