This commit is contained in:
BoHung Chiu 2021-11-18 09:39:01 +08:00
parent c69602282a
commit 29c9fb0205
1 changed files with 2 additions and 2 deletions

View File

@ -38,8 +38,8 @@ class SiteServer
if (need_change || (!need_change && self.enable_redirect_default_domain))
if self.default_domain_names_changed?
check_domains = []
removed_default_domains = self.default_domain_names_was - self.default_domain_names
add_default_domains = self.default_domain_names - self.default_domain_names_was
removed_default_domains = self.default_domain_names_was.to_a - self.default_domain_names
add_default_domains = self.default_domain_names - self.default_domain_names_was.to_a
check_domains += removed_default_domains
check_domains += add_default_domains
check_domains = check_domains.map{|domain| Regexp.new("(\\A|\\s)"+domain.gsub(".","\\.").gsub("*","[^.]*") + "($|\\s)")}