Skip to content

Commit

Permalink
Restrict to modern browsers
Browse files Browse the repository at this point in the history
We have a lot of requests from stealth-bots that are overloading the imageserver and causing honeybadger alerts.  These bots often pretend to be a random version of Chrome.  By only allowing the modern versions of browsers, we remove a bunch of requests we don't care about. https://github.com/rails/rails/blob/e3cf59212be585df91e1f1ccc7b76d08fb28402b/actionpack/lib/action_controller/metal/allow_browser.rb\#L75
  • Loading branch information
jcoyne committed Jan 28, 2025
1 parent a9c9b48 commit e01a0dd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# :nodoc:
class ApplicationController < ActionController::Base
allow_browser versions: :modern
include CurrentUserConcern

rescue_from CanCan::AccessDenied, with: :rescue_can_can
Expand Down

0 comments on commit e01a0dd

Please sign in to comment.