subdomain + domain
This commit is contained in:
@@ -23,8 +23,11 @@ class ApplicationController < ActionController::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def lookup_domain
|
def lookup_domain
|
||||||
|
|
||||||
if request.subdomain.present? && request.subdomain != "www"
|
if request.subdomain.present? && request.subdomain != "www"
|
||||||
@license = cache_license(ENV["SX_PROVISION_URL"], request.subdomain.downcase) # request.subdomain.downcase
|
from = request.subdomain.downcase #+ "." + request.domain.downcase
|
||||||
|
puts from
|
||||||
|
@license = cache_license(ENV["SX_PROVISION_URL"], from) # request.subdomain.downcase
|
||||||
if (!@license.nil?)
|
if (!@license.nil?)
|
||||||
# logger.info "Location - " + @license.name
|
# logger.info "Location - " + @license.name
|
||||||
ActiveRecord::Base.establish_connection(website_connection(@license))
|
ActiveRecord::Base.establish_connection(website_connection(@license))
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
development:
|
development:
|
||||||
secret_key_base: b61d85f8ed2a1a9e0eeece3443b3e8f838d002cc1d9f32115d8e93db920e2957adfedc57501d44741211538f3108b742cdeada87d5bfae796c53da1f90a3cd61
|
secret_key_base: b61d85f8ed2a1a9e0eeece3443b3e8f838d002cc1d9f32115d8e93db920e2957adfedc57501d44741211538f3108b742cdeada87d5bfae796c53da1f90a3cd61
|
||||||
sx_provision_url: 192.168.1.94:3002/api #provision.zsai.ws/api
|
sx_provision_url: 192.168.1.147:3002/api #provision.zsai.ws/api
|
||||||
server_mode: cloud
|
server_mode: cloud
|
||||||
cipher_type: AES-256-CBC
|
cipher_type: AES-256-CBC
|
||||||
aes_key: <%= ENV['AES_KEY'] %>
|
aes_key: <%= ENV['AES_KEY'] %>
|
||||||
|
|||||||
Reference in New Issue
Block a user