修改了请求来源的判断

dev_partners
Alec Zhou 6 years ago
parent fb7233777f
commit f103d0fe23

@ -1151,7 +1151,7 @@ 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 == 'localhost' && !current_user.logged? flag = URI(url).host == URI(Redmine::Configuration['openi_domain']).host && !current_user.logged?
logger.info "----------------------- #{url} -------------------------" logger.info "----------------------- #{url} -------------------------"
logger.info "----------------------- #{URI(url).host} --------------------------" logger.info "----------------------- #{URI(url).host} --------------------------"
logger.info "----------------------- #{flag} -------------------------" logger.info "----------------------- #{flag} -------------------------"

Loading…
Cancel
Save