add a workaround to stop getting exception emails about IpSpoofAttackErrors

This commit is contained in:
Carl Chenet 2017-05-20 15:21:07 +02:00
parent 1cc5ee6c52
commit 1691b589e0

View file

@ -8,6 +8,9 @@ class ApplicationController < ActionController::Base
TAG_FILTER_COOKIE = :tag_filters
def authenticate_user
# eagerly evaluate, in case this triggers an IpSpoofAttackError
request.remote_ip
if session[:u] &&
(user = User.where(:session_token => session[:u].to_s).first) &&
user.is_active?