From: Sarah Hoffmann Date: Wed, 2 Aug 2023 18:13:10 +0000 (+0200) Subject: nominatim: always send 404 for outdated /.*/ URLs X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/5636881ff4e16aaf1849c0dd399a138b8638d6cc nominatim: always send 404 for outdated /.*/ URLs --- diff --git a/cookbooks/nominatim/templates/default/nginx.erb b/cookbooks/nominatim/templates/default/nginx.erb index a18a06664..297e5d68e 100644 --- a/cookbooks/nominatim/templates/default/nginx.erb +++ b/cookbooks/nominatim/templates/default/nginx.erb @@ -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; }