|
...
|
...
|
@@ -179,15 +179,17 @@ class DomainInfoLogic extends BaseLogic |
|
|
|
$this->fail('域名' . $info['domain'] . '未解析至目标服务器');
|
|
|
|
}
|
|
|
|
$domain_301 = '';
|
|
|
|
foreach ($this->param['other_domain']??[] as $other_domain){
|
|
|
|
if($other_domain && substr($other_domain,0,2) != '*.'){
|
|
|
|
if($this->check_a($other_domain,DomainInfo::SERVER_IP_301)){
|
|
|
|
$domain_301 = $other_domain;
|
|
|
|
}else{
|
|
|
|
if(!$this->check_cname($other_domain, $serversIpInfo)){
|
|
|
|
$this->fail('域名' . $other_domain . '未解析至目标服务器');
|
|
|
|
}
|
|
|
|
$other_domain = [];
|
|
|
|
foreach ($this->param['other_domain']??[] as $vo){
|
|
|
|
if(!$vo){
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if(substr($vo,0,2) == '*.' || $this->check_cname($vo,$serversIpInfo)){
|
|
|
|
$other_domain[] = $vo;
|
|
|
|
}elseif($this->check_a($vo,DomainInfo::SERVER_IP_301)){
|
|
|
|
$domain_301 = $vo;
|
|
|
|
}else{
|
|
|
|
$this->fail('域名' . $vo . '未解析至目标服务器');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -231,7 +233,7 @@ class DomainInfoLogic extends BaseLogic |
|
|
|
|
|
|
|
//保存301跳转数据+其他域名
|
|
|
|
$data = [
|
|
|
|
'other_domain'=>json_encode(array_filter($this->param['other_domain'] ?? [])),
|
|
|
|
'other_domain'=>json_encode($other_domain),
|
|
|
|
'extend_config'=>json_encode($extend_config),
|
|
|
|
'type'=>$this->param['type'],
|
|
|
|
'private_key' => $this->param['key'] ?? '',
|
...
|
...
|
|