This commit is contained in:
BoHung Chiu 2021-10-08 20:12:01 +08:00
parent 23d659a6da
commit aaf224ae42
1 changed files with 4 additions and 3 deletions

View File

@ -230,10 +230,11 @@ class SiteConstruct
custom_default_domain_name = ""
domain_names = domain_name.strip().split(" ")
if default_domain_idx == -1
custom_default_domain_name = site_server.default_domain_names.select do |default_domain_name|
site_server.default_domain_names.each do |default_domain_name|
default_domain_name = Regexp.new("\\A"+default_domain_name.gsub(".","\\.").gsub("*","[^.]*"))
domain_names.select{|n| n.match(default_domain_name) }.count != 0
end.first
custom_default_domain_name = domain_names.select{|n| n.match(default_domain_name) }.first
break if custom_default_domain_name.present?
end
else
custom_default_domain_name = domain_names[default_domain_idx]
end