From 9900ea385a7e3bf9c0f7b5edc7035c98c588a75f Mon Sep 17 00:00:00 2001 From: phyusin Date: Sat, 12 May 2018 16:33:28 +0630 Subject: [PATCH] change token,action,secrets --- app/controllers/concerns/token_verification.rb | 2 +- config/initializers/action_controller.rb | 10 +++++----- config/secrets.yml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/controllers/concerns/token_verification.rb b/app/controllers/concerns/token_verification.rb index 06cb8604..c1bce9b2 100755 --- a/app/controllers/concerns/token_verification.rb +++ b/app/controllers/concerns/token_verification.rb @@ -18,7 +18,7 @@ module TokenVerification # Rails.logger.debug "token - " + token.to_s if(options.length !=0 && options["from"] == "DOEMAL") if(ENV["SERVER_MODE"] === "cloud") - from = "local" #request.subdomain.downcase + "." + request.domain.downcase + from = request.subdomain.downcase + "." + request.domain.downcase #"local" aes = MyAesCrypt.new return aes.checkKeyForAuth(from, token) end diff --git a/config/initializers/action_controller.rb b/config/initializers/action_controller.rb index b84bca54..e0eb7455 100644 --- a/config/initializers/action_controller.rb +++ b/config/initializers/action_controller.rb @@ -20,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 56675a6a..2768d134 100755 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -13,7 +13,7 @@ development: secret_key_base: b61d85f8ed2a1a9e0eeece3443b3e8f838d002cc1d9f32115d8e93db920e2957adfedc57501d44741211538f3108b742cdeada87d5bfae796c53da1f90a3cd61 sx_provision_url: connect.pos-myanmar.com/api #connect.smartsales.dev/api #connect.smartsales.asia/api #provision.zsai.ws/api - server_mode: cloud + server_mode: application cipher_type: AES-256-CBC sx_key: Wh@t1$C2L