]> git.openstreetmap.org Git - chef.git/commitdiff
Pass only HEAD and GET /api/0.6/(elements) requests to cgimap
authorAnton Khorev <tony29@yandex.ru>
Tue, 11 Feb 2025 00:08:05 +0000 (03:08 +0300)
committerAnton Khorev <tony29@yandex.ru>
Tue, 11 Feb 2025 00:08:05 +0000 (03:08 +0300)
cookbooks/dev/templates/default/apache.rails.erb
cookbooks/web/templates/default/apache.frontend.erb

index 957866c5c482473e12a185a378d3567a38fe6137..082931dde60e7897cf5c71e814fe42118f71019b 100644 (file)
@@ -48,6 +48,7 @@
         RewriteRule ^/api/0\.6/(node|way|relation)/[0-9]+/relations(\.json|\.xml)?$ unix:<%= @cgimap_socket %>|fcgi://127.0.0.1$0 [P]
         RewriteRule ^/api/0\.6/node/[0-9]+/ways(\.json|\.xml)?$ unix:<%= @cgimap_socket %>|fcgi://127.0.0.1$0 [P]
         RewriteRule ^/api/0\.6/(way|relation)/[0-9]+/full(\.json|\.xml)?$ unix:<%= @cgimap_socket %>|fcgi://127.0.0.1$0 [P]
+        RewriteCond %{REQUEST_METHOD} ^(HEAD|GET)$
         RewriteRule ^/api/0\.6/(nodes|ways|relations)(\.json|\.xml)?$ unix:<%= @cgimap_socket %>|fcgi://127.0.0.1$0 [P]
         RewriteRule ^/api/0\.6/changeset/[0-9]+/(upload|download)(\.json|\.xml)?$ unix:<%= @cgimap_socket %>|fcgi://127.0.0.1$0 [P]
 <% end -%>
index 39f2a6007118589c89b429af84ad23ca7087bb79..98097d7d92c8c05d92f80a4180177797b117228b 100644 (file)
@@ -186,6 +186,7 @@ ErrorLog /var/log/apache2/error.log
   RewriteRule ^/api/0\.6/(node|way|relation)/[0-9]+/relations(\.json|\.xml)?$ unix:/run/cgimap/socket|fcgi://127.0.0.1$0 [P]
   RewriteRule ^/api/0\.6/node/[0-9]+/ways(\.json|\.xml)?$ unix:/run/cgimap/socket|fcgi://127.0.0.1$0 [P]
   RewriteRule ^/api/0\.6/(way|relation)/[0-9]+/full(\.json|\.xml)?$ unix:/run/cgimap/socket|fcgi://127.0.0.1$0 [P]
+  RewriteCond %{REQUEST_METHOD} ^(HEAD|GET)$
   RewriteRule ^/api/0\.6/(nodes|ways|relations)(\.json|\.xml)?$ unix:/run/cgimap/socket|fcgi://127.0.0.1$0 [P]
   RewriteRule ^/api/0\.6/changeset/[0-9]+/(upload|download)(\.json|\.xml)?$ unix:/run/cgimap/socket|fcgi://127.0.0.1$0 [P]