]> git.openstreetmap.org Git - chef.git/commitdiff
nominatim: add hook for more generic blocks
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 6 Oct 2020 13:31:04 +0000 (15:31 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 6 Oct 2020 13:31:04 +0000 (15:31 +0200)
cookbooks/nominatim/recipes/default.rb
cookbooks/nominatim/templates/default/nginx.erb

index e0a7870d5511d36b2bafc618ac2fe9daf178628d..fd7f495734f6d5ba9960f2baa6d994e7b9adb791 100644 (file)
@@ -370,7 +370,7 @@ directory "#{basedir}/etc" do
   mode "775"
 end
 
-%w[user_agent referrer email].each do |name|
+%w[user_agent referrer email generic].each do |name|
   file "#{basedir}/etc/nginx_blocked_#{name}.conf" do
     action :create_if_missing
     owner "nominatim"
index 2c22ae850d9743e8f1963611be81c9615eff474e..d56d99c8a13b52fdae1fadfb8542fe34ed80da4a 100644 (file)
@@ -162,6 +162,7 @@ server {
         { return 403; }
         if ($blocked_email)
         { return 403; }
+        include <%= @confdir %>/nginx_blocked_generic.conf;
 
         limit_req zone=www burst=10;
         limit_req zone=tarpit burst=2;
@@ -183,6 +184,7 @@ server {
         { return 403; }
         if ($blocked_email)
         { return 403; }
+        include <%= @confdir %>/nginx_blocked_generic.conf;
 
         limit_req zone=www burst=10;
         limit_req zone=tarpit burst=2;