]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/templates/default/nginx.erb
nominatim: refuse to geocode IP addresses
[chef.git] / cookbooks / nominatim / templates / default / nginx.erb
index 6aa07dbe139a61293d4503ae107f443761bc19b5..e15099c057a3de9ed2ed79cd7c9353fc9202742a 100644 (file)
@@ -201,6 +201,8 @@ server {
         { return 403; }
         if ($blocked_path)
         { return 403; }
+        if ($args ~* "q=[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[ &]")
+        { return 418; }
         include <%= @confdir %>/nginx_blocked_generic.conf;
 
         limit_req zone=www burst=10;