From f103d0fe23012a7effee5dbd6d953edaed9fd401 Mon Sep 17 00:00:00 2001 From: Alec Zhou Date: Sat, 27 Apr 2019 11:04:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E6=9D=A5=E6=BA=90=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index a143b03e..533cead1 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1151,7 +1151,7 @@ class ApplicationController < ActionController::Base def user_login_and_from_openi 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 "----------------------- #{URI(url).host} --------------------------" logger.info "----------------------- #{flag} -------------------------"