合并分支 'akun' 到 'master'
update 查看合并请求 !771
正在显示
1 个修改的文件
包含
10 行增加
和
12 行删除
| @@ -179,17 +179,15 @@ class DomainInfoLogic extends BaseLogic | @@ -179,17 +179,15 @@ class DomainInfoLogic extends BaseLogic | ||
| 179 | $this->fail('域名' . $info['domain'] . '未解析至目标服务器'); | 179 | $this->fail('域名' . $info['domain'] . '未解析至目标服务器'); |
| 180 | } | 180 | } |
| 181 | $domain_301 = ''; | 181 | $domain_301 = ''; |
| 182 | - $other_domain = []; | ||
| 183 | - foreach ($this->param['other_domain']??[] as $vo){ | ||
| 184 | - if(!$vo){ | ||
| 185 | - continue; | ||
| 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 . '未解析至目标服务器'); | 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 | + } | ||
| 190 | + } | ||
| 193 | } | 191 | } |
| 194 | } | 192 | } |
| 195 | 193 | ||
| @@ -233,7 +231,7 @@ class DomainInfoLogic extends BaseLogic | @@ -233,7 +231,7 @@ class DomainInfoLogic extends BaseLogic | ||
| 233 | 231 | ||
| 234 | //保存301跳转数据+其他域名 | 232 | //保存301跳转数据+其他域名 |
| 235 | $data = [ | 233 | $data = [ |
| 236 | - 'other_domain'=>json_encode($other_domain), | 234 | + 'other_domain'=>json_encode(array_filter($this->param['other_domain'] ?? [])), |
| 237 | 'extend_config'=>json_encode($extend_config), | 235 | 'extend_config'=>json_encode($extend_config), |
| 238 | 'type'=>$this->param['type'], | 236 | 'type'=>$this->param['type'], |
| 239 | 'private_key' => $this->param['key'] ?? '', | 237 | 'private_key' => $this->param['key'] ?? '', |
-
请 注册 或 登录 后发表评论