|
@@ -179,15 +179,17 @@ class DomainInfoLogic extends BaseLogic |
|
@@ -179,15 +179,17 @@ class DomainInfoLogic extends BaseLogic |
|
179
|
$this->fail('域名' . $info['domain'] . '未解析至目标服务器');
|
179
|
$this->fail('域名' . $info['domain'] . '未解析至目标服务器');
|
|
180
|
}
|
180
|
}
|
|
181
|
$domain_301 = '';
|
181
|
$domain_301 = '';
|
|
182
|
- foreach ($this->param['other_domain']??[] as $other_domain){
|
|
|
|
183
|
- if($other_domain && substr($other_domain,0,2) != '*.'){
|
|
|
|
184
|
- if($this->check_a($other_domain,DomainInfo::SERVER_IP_301)){
|
|
|
|
185
|
- $domain_301 = $other_domain;
|
|
|
|
186
|
- }else{
|
|
|
|
187
|
- if(!$this->check_cname($other_domain, $serversIpInfo)){
|
|
|
|
188
|
- $this->fail('域名' . $other_domain . '未解析至目标服务器');
|
|
|
|
189
|
- }
|
182
|
+ $other_domain = [];
|
|
|
|
183
|
+ foreach ($this->param['other_domain']??[] as $vo){
|
|
|
|
184
|
+ if(!$vo){
|
|
|
|
185
|
+ continue;
|
|
190
|
}
|
186
|
}
|
|
|
|
187
|
+ if(substr($vo,0,2) == '*.' || $this->check_cname($vo,$serversIpInfo)){
|
|
|
|
188
|
+ $other_domain[] = $vo;
|
|
|
|
189
|
+ }elseif($this->check_a($vo,DomainInfo::SERVER_IP_301)){
|
|
|
|
190
|
+ $domain_301 = $vo;
|
|
|
|
191
|
+ }else{
|
|
|
|
192
|
+ $this->fail('域名' . $vo . '未解析至目标服务器');
|
|
191
|
}
|
193
|
}
|
|
192
|
}
|
194
|
}
|
|
193
|
|
195
|
|
|
@@ -231,7 +233,7 @@ class DomainInfoLogic extends BaseLogic |
|
@@ -231,7 +233,7 @@ class DomainInfoLogic extends BaseLogic |
|
231
|
|
233
|
|
|
232
|
//保存301跳转数据+其他域名
|
234
|
//保存301跳转数据+其他域名
|
|
233
|
$data = [
|
235
|
$data = [
|
|
234
|
- 'other_domain'=>json_encode(array_filter($this->param['other_domain'] ?? [])),
|
236
|
+ 'other_domain'=>json_encode($other_domain),
|
|
235
|
'extend_config'=>json_encode($extend_config),
|
237
|
'extend_config'=>json_encode($extend_config),
|
|
236
|
'type'=>$this->param['type'],
|
238
|
'type'=>$this->param['type'],
|
|
237
|
'private_key' => $this->param['key'] ?? '',
|
239
|
'private_key' => $this->param['key'] ?? '',
|