fix check license
This commit is contained in:
@@ -236,8 +236,8 @@ class License
|
||||
else
|
||||
tld_length = Rails.application.config.action_dispatch.tld_length
|
||||
subdomains = URL.extract_subdomains(lookup, tld_length)
|
||||
if subdomains.last && subdomains.last != 'www'
|
||||
if key = license.keys.find { |k| URL.extract_subdomains(k, tld_length).last == subdomains.last}
|
||||
if subdomains.first && subdomains.first != 'www'
|
||||
if key = license.keys.find { |k| URL.extract_subdomains(k, tld_length).first == subdomains.first}
|
||||
license[lookup] = license[key]
|
||||
end
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user