From 4801ba2917d401fbf953047725a3ec435011a4f3 Mon Sep 17 00:00:00 2001 From: Alec Zhou Date: Fri, 26 Apr 2019 18:33:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=BB=A5=E4=BE=9B=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e684a7c9..839a8a4f 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1151,6 +1151,10 @@ class ApplicationController < ActionController::Base def user_login_and_from_openi url = request.referer.nil? ? Redmine::Configuration['educoder_domain'] : request.referer - URI(url).host == 'openi.org.cn' && !current_user.logged? + flag = URI(url).host == 'localhost' && !current_user.logged? + logger.debug "----------------------- #{url} -------------------------" + logger.debug "----------------------- #{URI(url).host} --------------------------" + logger.debug "----------------------- #{flag} -------------------------" + flag end end