mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-07-30 09:17:44 -04:00
Block Semrush crawler in Rack Attack initializer
Added a blocklist entry for the Semrush crawler to prevent abusive requests.
This commit is contained in:
@@ -27,6 +27,11 @@ class Rack::Attack
|
||||
end
|
||||
end
|
||||
|
||||
# Abusive services
|
||||
blocklist('block Semrush crawler') do |request|
|
||||
request.user_agent.to_s.downcase.include?('semrush')
|
||||
end
|
||||
|
||||
### Custom Response Headers ###
|
||||
|
||||
# Add Retry-After header to throttled responses
|
||||
|
||||
Reference in New Issue
Block a user