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