作者 lyh
@@ -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 }
@@ -74,7 +74,8 @@ class EditDomainBt implements ShouldQueue @@ -74,7 +74,8 @@ class EditDomainBt implements ShouldQueue
74 'other_domain' => $domain_info['other_domain'], 74 'other_domain' => $domain_info['other_domain'],
75 'is_https' => $domain_info['is_https'], 75 'is_https' => $domain_info['is_https'],
76 'not_allow_country' => $domain_info['not_allow_country'], 76 'not_allow_country' => $domain_info['not_allow_country'],
77 - 'not_allow_ip' => $domain_info['not_allow_ip'] 77 + 'not_allow_ip' => $domain_info['not_allow_ip'],
  78 + 'amp_status' => $domain_info['amp_status']
78 ]; 79 ];
79 } else { 80 } else {
80 $api_url = 'http://' . $server_info['domain'] . '/api/applySsl'; 81 $api_url = 'http://' . $server_info['domain'] . '/api/applySsl';
@@ -84,7 +85,8 @@ class EditDomainBt implements ShouldQueue @@ -84,7 +85,8 @@ class EditDomainBt implements ShouldQueue
84 'other_domain' => $domain_info['other_domain'], 85 'other_domain' => $domain_info['other_domain'],
85 'is_https' => $domain_info['is_https'], 86 'is_https' => $domain_info['is_https'],
86 'not_allow_country' => $domain_info['not_allow_country'], 87 'not_allow_country' => $domain_info['not_allow_country'],
87 - 'not_allow_ip' => $domain_info['not_allow_ip'] 88 + 'not_allow_ip' => $domain_info['not_allow_ip'],
  89 + 'amp_status' => $domain_info['amp_status']
88 ]; 90 ];
89 } 91 }
90 92