作者 刘锟

合并分支 'akun' 到 'master'

Akun



查看合并请求 !832
@@ -126,14 +126,19 @@ class NoticeController extends BaseController @@ -126,14 +126,19 @@ class NoticeController extends BaseController
126 return $this->error('other_domain参数必须为数组'); 126 return $this->error('other_domain参数必须为数组');
127 } 127 }
128 128
  129 + $origin_array = parse_url($origin_domain);
  130 + $origin_domain = $origin_array['host'] ?? '';
129 if (empty($origin_domain)) { 131 if (empty($origin_domain)) {
130 return $this->error('origin_domain参数不能为空'); 132 return $this->error('origin_domain参数不能为空');
131 } 133 }
132 134
  135 + $target_array = parse_url($target_domain);
  136 + $target_domain = $target_array['host'] ?? '';
133 if (empty($target_domain)) { 137 if (empty($target_domain)) {
134 return $this->error('target_domain参数不能为空'); 138 return $this->error('target_domain参数不能为空');
135 } 139 }
136 140
  141 +
137 if(!check_domain_record($origin_domain,['domain'=>'','ip'=>DomainInfo::SERVER_IP_301])){ 142 if(!check_domain_record($origin_domain,['domain'=>'','ip'=>DomainInfo::SERVER_IP_301])){
138 return $this->error($origin_domain . ' 未解析至 ' . DomainInfo::SERVER_IP_301); 143 return $this->error($origin_domain . ' 未解析至 ' . DomainInfo::SERVER_IP_301);
139 } 144 }