]> git.openstreetmap.org Git - chef.git/commitdiff
tilecache: fix limit supported request methods
authorGrant Slater <git@firefishy.com>
Sun, 24 Nov 2019 20:52:24 +0000 (20:52 +0000)
committerGrant Slater <git@firefishy.com>
Sun, 24 Nov 2019 20:52:24 +0000 (20:52 +0000)
cookbooks/tilecache/templates/default/nginx_tile.conf.erb

index bc41ffbafde50670ba3dd1caec20109d845da097..eb7cb6771bd45f9d4d2ab285c9101f1381b0e5da 100644 (file)
@@ -105,11 +105,6 @@ server {
     # See: http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_early_data
     ssl_early_data on;
 
     # See: http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_early_data
     ssl_early_data on;
 
-    # Only allow GET / HEAD / OPTIONS (CORS) requests
-    limit_except GET HEAD OPTIONS {
-      deny all;
-    }
-
     # Immediately 404 layers we do not support
 <% for i in 20..99 do %>
     location /<%= i %>/ {
     # Immediately 404 layers we do not support
 <% for i in 20..99 do %>
     location /<%= i %>/ {
@@ -184,6 +179,11 @@ server {
     # Dedicated zoom handler for caching
     location /<%= i %>/ {
 <% end %>
     # Dedicated zoom handler for caching
     location /<%= i %>/ {
 <% end %>
+      # Only allow GET / HEAD / OPTIONS (CORS) requests
+      limit_except GET HEAD OPTIONS {
+        deny all;
+      }
+
       proxy_pass http://tile_cache_backend;
       proxy_set_header X-Forwarded-For $remote_addr;
       proxy_http_version 1.1;
       proxy_pass http://tile_cache_backend;
       proxy_set_header X-Forwarded-For $remote_addr;
       proxy_http_version 1.1;