Hashar has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/75105


Change subject: contint: deny webspider from accessing Jenkins
......................................................................

contint: deny webspider from accessing Jenkins

Some web spiders have the bad habit to come hit our Jenkins installation
which might sometime cause it to end up slightly overloaded.  This patch
is inspired by Gerrit blacklisting already in use.

Change-Id: Ia689694df3f704e31fce29f8bc767e9899cf5225
---
M modules/contint/files/apache/proxy_jenkins
1 file changed, 12 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/05/75105/1

diff --git a/modules/contint/files/apache/proxy_jenkins 
b/modules/contint/files/apache/proxy_jenkins
index 1b5b1dd..b2f407f 100644
--- a/modules/contint/files/apache/proxy_jenkins
+++ b/modules/contint/files/apache/proxy_jenkins
@@ -12,6 +12,17 @@
 # Most unix distribution deny proxy by default (ie 
/etc/apache2/mods-enabled/proxy.conf in Ubuntu)
 
 <Proxy http://localhost:8080/ci*>
+
+       # user agent blacklisting for Jenkins
+       SetEnvIf User-Agent 80legs bad_browser
+       SetEnvIf User-Agent bingbot bad_browser
+       SetEnvIf User-Agent Baiduspider bad_browser
+       SetEnvIf User-Agent JikeSpider bad_browser
+       SetEnvIf User-Agent Sogou bad_browser
+       SetEnvIf User-Agent Sosospider bad_browser
+       SetEnvIf User-Agent TweetmemeBot bad_browser
+
        Order deny,allow
-       Allow from all
+       deny from env=bad_browser
+
 </Proxy>

-- 
To view, visit https://gerrit.wikimedia.org/r/75105
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia689694df3f704e31fce29f8bc767e9899cf5225
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to