diff --git a/playbooks/roles/lodgeit/templates/paste.vhost.j2 b/playbooks/roles/lodgeit/templates/paste.vhost.j2 index 67db387199..ffa68099e6 100644 --- a/playbooks/roles/lodgeit/templates/paste.vhost.j2 +++ b/playbooks/roles/lodgeit/templates/paste.vhost.j2 @@ -37,6 +37,14 @@ ProxyPass / http://localhost:9000/ retry=0 ProxyPassReverse / http://localhost:9000/ + # NOTE(ianw) 2021-08-04 : block GET /json/?method=pastes.getRecent + # This a) gives Python 3 unicode errors we haven't looked into and b) + # is only used by bots as a vector for scraping things. Just + # disable it. + RewriteEngine On + RewriteCond %{QUERY_STRING} "method=pastes.getRecent" + RewriteRule .* - [F,L] + ProxyPass !