Skip to content

Commit

Permalink
Merge pull request #2505 from sul-dlss/cbeer-patch-2
Browse files Browse the repository at this point in the history
Update rack_attack.rb
  • Loading branch information
cbeer authored Aug 7, 2024
2 parents cfa9a8d + de7ca69 commit 5470efb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/rack_attack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Attack

if Settings.throttling.notify_honeybadger && (
((match_data[:limit] - match_data[:count]) < 5) || (match_data[:count] % 10).zero?
) && (request.headers['HTTP_USER_AGENT'] || '') !~ /(Google|bot)/i
) && (request.env['HTTP_USER_AGENT'] || '') !~ /(Google|bot)/i
Honeybadger.notify('Throttling request', context: { ip: request.ip, path: request.path }.merge(match_data))
end

Expand Down

0 comments on commit 5470efb

Please sign in to comment.