fix check license subdomain
This commit is contained in:
@@ -195,16 +195,11 @@ class License
|
||||
end
|
||||
end
|
||||
|
||||
def self.check_license_subdomain(lookup)
|
||||
def check_license_subdomain(lookup)
|
||||
aes = MyAesCrypt.new
|
||||
aes_key, aes_iv = aes.export_key(lookup)
|
||||
|
||||
server_mode = ENV["SERVER_MODE"]
|
||||
unless ENV["SERVER_MODE"] == "cloud"
|
||||
server_mode = "application"
|
||||
end
|
||||
|
||||
params = { query: { lookup_type: server_mode, lookup: lookup, iv_key: aes_iv} }
|
||||
params = { query: { lookup_type: self.server_mode, lookup: lookup, iv_key: aes_iv} }
|
||||
response = self.class.get("/subdomain", params)
|
||||
response.parsed_response["status"]
|
||||
end
|
||||
|
||||
@@ -63,7 +63,8 @@ class ActionController::Base
|
||||
end
|
||||
|
||||
def check_subdomain(lookup)
|
||||
License.check_license_subdomain(lookup)
|
||||
license = License.new(ENV["SX_PROVISION_URL"], lookup)
|
||||
license.check_license_subdomain(lookup)
|
||||
end
|
||||
|
||||
def check_license(lookup)
|
||||
|
||||
Reference in New Issue
Block a user