|
@@ -153,7 +153,7 @@ class DomainInfo extends Command |
|
@@ -153,7 +153,7 @@ class DomainInfo extends Command |
|
153
|
$servers_ip_info = $serverIpModel->read(['id' => $project_info['serve_id']], ['servers_id']);
|
153
|
$servers_ip_info = $serverIpModel->read(['id' => $project_info['serve_id']], ['servers_id']);
|
|
154
|
if ($servers_ip_info && $servers_ip_info['servers_id'] != ServerConfig::SELF_SITE_ID) {
|
154
|
if ($servers_ip_info && $servers_ip_info['servers_id'] != ServerConfig::SELF_SITE_ID) {
|
|
155
|
//非自建站项目,申请免费证书
|
155
|
//非自建站项目,申请免费证书
|
|
156
|
- $this->updateAmpPrivate($v['domain']);
|
156
|
+ $this->updateAmpPrivate($v);
|
|
157
|
|
157
|
|
|
158
|
$ssl_new = $this->updateDomainSsl($v['domain']);
|
158
|
$ssl_new = $this->updateDomainSsl($v['domain']);
|
|
159
|
$ssl_new['from'] && $data['certificate_start_time'] = $ssl_new['from'];
|
159
|
$ssl_new['from'] && $data['certificate_start_time'] = $ssl_new['from'];
|
|
@@ -212,24 +212,27 @@ class DomainInfo extends Command |
|
@@ -212,24 +212,27 @@ class DomainInfo extends Command |
|
212
|
"rewrite" => $param['extend_config'],
|
212
|
"rewrite" => $param['extend_config'],
|
|
213
|
'other_domain' => $param['other_domain'],
|
213
|
'other_domain' => $param['other_domain'],
|
|
214
|
'is_https' => $param['is_https'],
|
214
|
'is_https' => $param['is_https'],
|
|
|
|
215
|
+ 'not_allow_country' => $param['not_allow_country'],
|
|
|
|
216
|
+ 'not_allow_ip' => $param['not_allow_ip'],
|
|
|
|
217
|
+ 'amp_status' => $param['amp_status']
|
|
215
|
];
|
218
|
];
|
|
216
|
return $this->curlRequest($url, $param);
|
219
|
return $this->curlRequest($url, $param);
|
|
217
|
}
|
220
|
}
|
|
218
|
|
221
|
|
|
219
|
/**
|
222
|
/**
|
|
220
|
* 更新amp站证书
|
223
|
* 更新amp站证书
|
|
221
|
- * @param $domain
|
224
|
+ * @param $param
|
|
222
|
* @return array
|
225
|
* @return array
|
|
223
|
* @author Akun
|
226
|
* @author Akun
|
|
224
|
* @date 2024/02/26 10:25
|
227
|
* @date 2024/02/26 10:25
|
|
225
|
*/
|
228
|
*/
|
|
226
|
- public function updateAmpPrivate($domain)
|
229
|
+ public function updateAmpPrivate($param)
|
|
227
|
{
|
230
|
{
|
|
228
|
- $url = 'https://' . $domain . '/api/createSiteAmp/';
|
231
|
+ $url = 'https://' . $param['domain'] . '/api/createSiteAmp/';
|
|
229
|
$param = [
|
232
|
$param = [
|
|
230
|
- "domain" => $domain,
|
|
|
|
231
|
- 'private_key' => '',
|
|
|
|
232
|
- 'cert' => ''
|
233
|
+ "domain" => $param['domain'],
|
|
|
|
234
|
+ 'not_allow_country' => $param['not_allow_country'],
|
|
|
|
235
|
+ 'not_allow_ip' => $param['not_allow_ip'],
|
|
233
|
];
|
236
|
];
|
|
234
|
return $this->curlRequest($url, $param);
|
237
|
return $this->curlRequest($url, $param);
|
|
235
|
}
|
238
|
}
|