Blocking python-requests on Apache

Today a client complained about ‘Resource Limit Is Reached

From a look at their access log saw hundreds of requests from some IPs using python-requests HTTP USER AGENT….

On .htaccess placed

RewriteCond %{HTTP_USER_AGENT} ^python-requests [NC]
RewriteRule .* - [F]

Et voilá

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.