[paste-web/oscp] Block access to XML api



commit 0b4de74024e9c21e2bb25436bf3548ef47b1597d
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Thu Apr 30 11:23:24 2020 +0200

    Block access to XML api

 paste.gnome.org.conf | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/paste.gnome.org.conf b/paste.gnome.org.conf
index 357abce6..6d6b894a 100644
--- a/paste.gnome.org.conf
+++ b/paste.gnome.org.conf
@@ -20,12 +20,15 @@
         SSLCertificateKeyFile /var/serving-cert/tls.key
 
         <Directory /var/www/html/paste.gnome.org/public>
-          RewriteEngine on
-          RewriteCond "%{HTTP_USER_AGENT}" "^omgili"
-          RewriteRule . - [F]
+           RewriteEngine on
+           RewriteCond "%{HTTP_USER_AGENT}" "^omgili"
+           RewriteRule . - [F]
 
-          Options Indexes FollowSymLinks
-          AllowOverride All
-          Require all granted
-        </Directory>
+           RewriteCond %{REQUEST_URI} "^/api/xml"
+           RewriteRule ^.*$ - [F,L]
+
+           Options Indexes FollowSymLinks
+           AllowOverride All
+           Require all granted
+       </Directory>
 </VirtualHost>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]