增加Ip显示

dev_local
daiao 6 years ago
parent a89f1569c3
commit f1e3932bd7

@ -106,7 +106,6 @@ module Mobile
# #
Rails.logger.info("########### host is #{request.host}") Rails.logger.info("########### host is #{request.host}")
Rails.logger.info("########### ip is #{request.remote_ip}")
if (Rails.env.development? && session[:user_id].blank?) || (session[:user_id].blank? && request.host.include?("testbdweb")) || params[:action] == "privateGit" if (Rails.env.development? && session[:user_id].blank?) || (session[:user_id].blank? && request.host.include?("testbdweb")) || params[:action] == "privateGit"
session[:user_id] = 12 #116 session[:user_id] = 12 #116
end end

@ -339,6 +339,7 @@ class ApplicationController < ActionController::Base
end end
def require_login def require_login
logger.info("########IP: #{request.remote_ip}")
if !User.current.logged? if !User.current.logged?
# Extract only the basic url parameters on non-GET requests # Extract only the basic url parameters on non-GET requests
if request.get? if request.get?

Loading…
Cancel
Save