Only allow access to export from known caches
authorTom Hughes <tom@compton.nu>
Wed, 30 Nov 2016 08:47:49 +0000 (08:47 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 30 Nov 2016 09:09:02 +0000 (09:09 +0000)
cookbooks/tile/templates/default/apache.erb

index c41c923..fbc781c 100644 (file)
   AllowOverride None
   Require all granted
 </Directory>
+
+<Location /cgi-bin/export>
+<% @caches.each do |cache| -%>
+<% cache.ipaddresses(:role => :external).sort.each do |address| -%>
+  Require ip <%= address %>
+<% end -%>
+<% end -%>
+</Location>