license activate lookup domain

This commit is contained in:
Thein Lin Kyaw
2020-02-19 15:46:09 +06:30
parent b207484735
commit 75cfc1e328

View File

@@ -39,18 +39,21 @@ class InstallController < BaseController
end end
def lookup_domain def lookup_domain
if ENV["SERVER_MODE"] == "application" if ENV["SERVER_MODE"] == "cloud"
not_found
elsif ENV["SERVER_MODE"] == "application"
if check_license(request.host) if check_license(request.host)
redirect_to root_url and return redirect_to root_url
end end
elsif request.subdomains.last && request.subdomains.last != "www" elsif request.subdomains.last && request.subdomains.last != "www"
if check_license(request.host) if check_license(request.host)
redirect_to root_url and return redirect_to root_url
elsif check_subdomain(request.host) elsif !check_subdomain(request.host)
return not_found
end end
else
not_found
end end
not_found
end end
# def current_license(url, key) # def current_license(url, key)