diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 3f789fc4..7fafd6bd 100755 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -38,11 +38,11 @@ class ApplicationController < ActionController::Base end else # check for license file - if check_license - current_license(ENV["SX_PROVISION_URL"]) - else - redirect_to activate_path - end + # if check_license + # current_license(ENV["SX_PROVISION_URL"]) + # else + # redirect_to activate_path + # end end end diff --git a/app/models/license.rb b/app/models/license.rb index 4af6059a..b8604b20 100755 --- a/app/models/license.rb +++ b/app/models/license.rb @@ -233,13 +233,13 @@ class License def get_key api_token = read_license_no_decrypt("api_token") shop_name = read_license_no_decrypt("shop_name") - @params = { query: {lookup_type: "application", api_token: api_token} } + @params = { query: {lookup_type: "application", api_token: api_token } } response = self.class.get("/get_key", @params) @data = response.parsed_response if (@data["status"]) ##Check from local redis - if available load local otherwise get from remote - cache_key = "shop:#{shop_name}" + cache_key = "shop:#{shop_name.chomp}" cache_license = nil diff --git a/config/license.yml b/config/license.yml index cc470a1d..bddfeafd 100644 --- a/config/license.yml +++ b/config/license.yml @@ -8,7 +8,7 @@ dbhost: nk57NaR38B2eSYyron3Nbw== dbschema: 3orxFaTi0uQhatBqZGiitQ== dbusername: EtMle9Gr0/PE3NFHHfwo5A== dbpassword: 86h61/O38GGo64nekz6oeA== -api_token: FVAGMnjVdaScfydXMbMvPPRWnkEwCSuxs +api_token: RZbpyAZlwOYFZfzbWmFhZgwCzRwJTBnPKIHrfM app_token: IoXPdqzbnQWbHsnxLAjMjimnjEJNySOeIo plan_sku: PyQJ2sk5NZTudqQ2YIU16A== renewable_date: d/Fk1deU/iPbZFDOdyKsjA== diff --git a/config/secrets.yml b/config/secrets.yml index 04a808fc..d04200ec 100755 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -12,7 +12,7 @@ development: secret_key_base: b61d85f8ed2a1a9e0eeece3443b3e8f838d002cc1d9f32115d8e93db920e2957adfedc57501d44741211538f3108b742cdeada87d5bfae796c53da1f90a3cd61 - sx_provision_url: connect.smartsales.dev//api #connect.smartsales.asia/api #provision.zsai.ws/api + sx_provision_url: 192.168.1.182:3002/api #connect.smartsales.asia/api #provision.zsai.ws/api server_mode: application cipher_type: AES-256-CBC sx_key: Wh@t1$C2L