Skip to content

Commit

Permalink
Fix for apps behind a local proxy (EY App Master)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekampf committed Feb 24, 2012
1 parent 1544418 commit d87f183
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/airbrake/rails/controller_methods.rb
Expand Up @@ -13,9 +13,11 @@ def notify_airbrake(hash_or_exception)

def airbrake_local_request?
if defined?(::Rails.application.config)
::Rails.application.config.consider_all_requests_local || request.local?
is_local = request.local? && (!request.env["HTTP_X_FORWARDED_FOR"])
::Rails.application.config.consider_all_requests_local || is_local
else
consider_all_requests_local || local_request?
is_local = local_request? && (!request.env["HTTP_X_FORWARDED_FOR"])
consider_all_requests_local || is_local
end
end

Expand Down

0 comments on commit d87f183

Please sign in to comment.