作者 刘锟

合并分支 'akun' 到 'master'

Akun



查看合并请求 !746
@@ -209,10 +209,21 @@ class DomainInfoLogic extends BaseLogic @@ -209,10 +209,21 @@ class DomainInfoLogic extends BaseLogic
209 } 209 }
210 } 210 }
211 211
  212 + $extend_config = [];
  213 + $unique_extend = [];
  214 + if(isset($this->param['extend_config']) && $this->param['extend_config']){
  215 + foreach ($this->param['extend_config'] as $k=>$v){
  216 + if(!in_array($v['origin'],$unique_extend)){
  217 + $unique_extend[] = $v['origin'];
  218 + $extend_config[] = $v;
  219 + }
  220 + }
  221 + }
  222 +
212 //保存301跳转数据+其他域名 223 //保存301跳转数据+其他域名
213 $data = [ 224 $data = [
214 'other_domain'=>json_encode(array_filter($this->param['other_domain'] ?? [])), 225 'other_domain'=>json_encode(array_filter($this->param['other_domain'] ?? [])),
215 - 'extend_config'=>json_encode(array_filter($this->param['extend_config'] ?? [])), 226 + 'extend_config'=>json_encode($extend_config),
216 'type'=>$this->param['type'], 227 'type'=>$this->param['type'],
217 'private_key' => $this->param['key'] ?? '', 228 'private_key' => $this->param['key'] ?? '',
218 'private_cert' => $this->param['cert'] ?? '', 229 'private_cert' => $this->param['cert'] ?? '',