Merge commit 'f378f10404
' into kb_migration
This commit is contained in:
commit
edb2a5dcf3
153 changed files with 1225 additions and 1025 deletions
|
@ -119,7 +119,7 @@ class DomainBlock < ApplicationRecord
|
|||
def rule_for(domain)
|
||||
return if domain.blank?
|
||||
|
||||
uri = Addressable::URI.new.tap { |u| u.host = domain.strip.gsub(/[\/]/, '') }
|
||||
uri = Addressable::URI.new.tap { |u| u.host = domain.strip.delete('/') }
|
||||
segments = uri.normalized_host.split('.')
|
||||
variants = segments.map.with_index { |_, i| segments[i..-1].join('.') }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue