From 379e56fbd4facd7561e413da10a36a4c52e64298 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Fri, 27 Jun 2025 09:28:42 +0200 Subject: [PATCH] nominatim: fix UI forwarding --- .../nominatim/templates/default/nginx.erb | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/cookbooks/nominatim/templates/default/nginx.erb b/cookbooks/nominatim/templates/default/nginx.erb index 226c7599a..ff972b4da 100644 --- a/cookbooks/nominatim/templates/default/nginx.erb +++ b/cookbooks/nominatim/templates/default/nginx.erb @@ -19,12 +19,12 @@ map $args $format { } map $uri/$format $forward_to_ui { - default 1; - ~^/ui 0; - ~/other$ 0; - ~/reverse.*/default 0; - ~/lookup.*/default 0; - ~/status.*/default 0; + default 0; + ~/search.*/default 1; + ~/reverse.*/html 1; + ~/status.*/html 1; + ~/search.*/html 1; + ~/details.*/html 1; } map $query_string $email_id { @@ -186,14 +186,9 @@ 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 ($forward_to_ui) { - rewrite ^(/[^/]*) https://$host/ui$1.html redirect; + rewrite ^(/[^/.]*) https://$host/ui$1.html redirect; } if ($blocked_user_agent ~ ^2$) { return 403; } -- 2.39.5