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