mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-09-21 13:34:54 -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:
1 parent
c9b8c54b81
commit
67da779381
1 file changed
+5
@@ -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