增加日志

dev_partners
Alec Zhou 6 years ago
parent 256e6021f4
commit 58a278f583

@ -1152,9 +1152,10 @@ class ApplicationController < ActionController::Base
def user_login_and_from_openi def user_login_and_from_openi
url = request.referer.nil? ? Redmine::Configuration['educoder_domain'] : request.referer url = request.referer.nil? ? Redmine::Configuration['educoder_domain'] : request.referer
flag = URI(url).host == URI(Redmine::Configuration['openi_domain']).host && !current_user.logged? flag = URI(url).host == URI(Redmine::Configuration['openi_domain']).host && !current_user.logged?
logger.info "----------------------- #{url} -------------------------" logger.info "----------------------- request referer: #{request.referer} -------------------------"
logger.info "----------------------- #{URI(url).host} --------------------------" logger.info "----------------------- url after processed: #{url} -------------------------"
logger.info "----------------------- #{flag} -------------------------" logger.info "----------------------- host: #{URI(url).host} --------------------------"
logger.info "----------------------- handle_flag: #{flag} -------------------------"
flag flag
end end
end end

Loading…
Cancel
Save