diff --git a/app/controllers/install_controller.rb b/app/controllers/install_controller.rb index 353509c3..5aa7af06 100755 --- a/app/controllers/install_controller.rb +++ b/app/controllers/install_controller.rb @@ -1,4 +1,5 @@ class InstallController < BaseController + skip_before_action :lookup_domain skip_before_action :verify_authenticity_token # before_action :check_license @@ -34,6 +35,7 @@ class InstallController < BaseController if response[:status] redirect_to root_url, notice: response["message"] else + byebug redirect_to activate_path, notice: response["message"] end end diff --git a/config/initializers/action_controller.rb b/config/initializers/action_controller.rb index 7cabe7f7..8f310dab 100644 --- a/config/initializers/action_controller.rb +++ b/config/initializers/action_controller.rb @@ -1,5 +1,4 @@ class ActionController::Base - before_action :lookup_domain, :set_locale private @@ -21,11 +20,11 @@ class 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/config/secrets.yml b/config/secrets.yml index b74dcdbc..7930204e 100755 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -12,7 +12,7 @@ development: secret_key_base: b61d85f8ed2a1a9e0eeece3443b3e8f838d002cc1d9f32115d8e93db920e2957adfedc57501d44741211538f3108b742cdeada87d5bfae796c53da1f90a3cd61 - sx_provision_url: 192.168.1.125:3002/api #connect.smartsales.dev/api #connect.smartsales.asia/api #provision.zsai.ws/api + sx_provision_url: connect.smartsales.dev/api #connect.smartsales.dev/api #connect.smartsales.asia/api #provision.zsai.ws/api server_mode: application cipher_type: AES-256-CBC sx_key: Wh@t1$C2L @@ -24,7 +24,7 @@ test: # instead read values from the environment. production: secret_key_base: c4bc81065013f9a3506d385bcbd49586c42e586488144b0de90c7da36867de9fa880f46b5c4f86f0ce9b7c783bb5a73bdb0e5605a47716567294390e726d3e22 - sx_provision_url: connect.smartsales.asia/api #192.168.1.147:3002/api + sx_provision_url: connect.smartsales.dev/api #192.168.1.147:3002/api server_mode: cloud cipher_type: AES-256-CBC sx_key: Wh@t1$C2L diff --git a/config/shops.json b/config/shops.json index dc0e3b46..1e141bc9 100644 --- a/config/shops.json +++ b/config/shops.json @@ -1,18 +1,7 @@ { "data": [ { - "lookup": "chromis-1.zsai.ws", - "value": { - "key": "877eY5iPvpVzaYnIkc2FgIy0U85FtqpTpQGqoM/RCG0=\n", - "iv": "qSVQaKzOm3TYmRP3DhHdig==\n" - } - }, - { - "lookup": "gw2a-13.zsai.dev", - "value": { - "key": "R0uRkGlvCD5DGaPV4SkhGlwaMR0ohYBBmNna+tpRXMc=\n", - "iv": "AP5iuLM36oJmnvLsWCo9+Q==\n" - } + } ] }