From 5636881ff4e16aaf1849c0dd399a138b8638d6cc Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Wed, 2 Aug 2023 20:13:10 +0200 Subject: [PATCH] nominatim: always send 404 for outdated /.*/ URLs --- cookbooks/nominatim/templates/default/nginx.erb | 5 +++++ 1 file changed, 5 insertions(+) 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; } -- 2.39.5