将request.referer修改为request.original_url

dev_partners
Alec Zhou 6 years ago
parent 0dd03710ae
commit d067d4dbed

@ -1150,9 +1150,9 @@ class ApplicationController < ActionController::Base
end end
def user_login_and_from_openi def user_login_and_from_openi
url = request.referer.nil? ? Redmine::Configuration['educoder_domain'] : request.referer url = request.original_url.nil? ? Redmine::Configuration['educoder_domain'] : request.original_url
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 "----------------------- request referer: #{request.referer} -------------------------" logger.info "----------------------- request referer: #{request.original_url} -------------------------"
logger.info "----------------------- url after processed: #{url} -------------------------" logger.info "----------------------- url after processed: #{url} -------------------------"
logger.info "----------------------- host: #{URI(url).host} --------------------------" logger.info "----------------------- host: #{URI(url).host} --------------------------"
logger.info "----------------------- handle_flag: #{flag} -------------------------" logger.info "----------------------- handle_flag: #{flag} -------------------------"

Loading…
Cancel
Save