ArielGlenn has submitted this change and it was merged.

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(-)

Approvals:
  ArielGlenn: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: Ia689694df3f704e31fce29f8bc767e9899cf5225
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: ArielGlenn <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to