]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/templates/default/nginx.erb
nominatim: also send CORS headers for 404 responses
[chef.git] / cookbooks / nominatim / templates / default / nginx.erb
index a44e9382c0bf69c9266f23bbe6c37aad707e64c3..941051d95ba0ec114746fabf32641f4aa53d929d 100644 (file)
@@ -24,6 +24,7 @@ map $uri/$format $forward_to_ui {
     ~/other$              0;
     ~/reverse.*/default   0;
     ~/lookup.*/default    0;
+    ~/status.*/default    0;
 }
 
 map $query_string $email_id {
@@ -168,6 +169,10 @@ server {
         index search.html;
     }
 
+    location /qa-data/ {
+        add_header Access-Control-Allow-Origin "*" always;
+    }
+
     location @php {
         if ($blocked_user_agent ~ ^2$)
         { return 403; }
@@ -178,7 +183,7 @@ server {
         include <%= @confdir %>/nginx_blocked_generic.conf;
 
         limit_req zone=www burst=10;
-        limit_req zone=tarpit burst=2;
+        limit_req zone=tarpit burst=5;
         limit_req zone=reverse burst=5;
         limit_req_status 429;
         fastcgi_pass nominatim_service;