]> git.openstreetmap.org Git - chef.git/commitdiff
nominatim: always send 404 for outdated /.*/ URLs
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 2 Aug 2023 18:13:10 +0000 (20:13 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 2 Aug 2023 18:14:35 +0000 (20:14 +0200)
cookbooks/nominatim/templates/default/nginx.erb

index a18a0666465fe1217cce52a40bd9ff4ffe32552b..297e5d68e0e9c4f2d76c8ad2c8473e00cad9a546 100644 (file)
@@ -182,6 +182,11 @@ server {
         add_header Access-Control-Allow-Origin "*" always;
     }
 
+    location ~* ^/(search|reverse)(\.php)?/ {
+        error_page 404 /404-old-search-syntax.html;
+        return 404;
+    }
+
     location @php {
         if ($blocked_user_agent ~ ^2$)
         { return 403; }