X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/faf7f77d947a16e3ef2afa84c1f89b54f5035b3e..c11a84f993c9c31b7fc9e54b57191ca6492d9fd8:/cookbooks/tilecache/templates/default/nginx_tile_ssl.conf.erb diff --git a/cookbooks/tilecache/templates/default/nginx_tile_ssl.conf.erb b/cookbooks/tilecache/templates/default/nginx_tile_ssl.conf.erb index 14a13a0e7..60d7d451f 100644 --- a/cookbooks/tilecache/templates/default/nginx_tile_ssl.conf.erb +++ b/cookbooks/tilecache/templates/default/nginx_tile_ssl.conf.erb @@ -1,3 +1,5 @@ +# DO NOT EDIT - This file is being maintained by Chef + upstream tile_cache_backend { server 127.0.0.1; <% @caches.each do |cache| -%> @@ -12,16 +14,14 @@ upstream tile_cache_backend { keepalive 32; } -# Rates table based on cookie value +# Rates table based on current cookie value map $cookie_qos_token $limit_rate_qos { - default 8192; # Default Rate - "test" 32768; # FIXME - Future TOTP Token + include /etc/nginx/conf.d/tile_qos_rates.map; } +# Set-Cookie table based on current cookie value map $cookie_qos_token $cookie_qos_token_set { - # Cookie Domain per RFC 6265 - default 'qos_token=test; Secure; httponly; Max-Age=3600; Domain=tile.openstreetmap.org; Path=/'; # FIXME - Future TOTP Token - "test" ''; # Do not Set-Cookie if current is valid + include /etc/nginx/conf.d/tile_qos_cookies.map; } map $http_user_agent $approved_scraper { @@ -88,9 +88,12 @@ server { # Allow Higher Traffic Rate from Approved User-Agents which do not support cookies (uses nginx Map) if ($approved_scraper) { - set $limit_rate 16384; + set $limit_rate 32768; } + # Strip any ?query parameters from urls + set $args ''; + # Allow cache purging headers only from select User-Agents (uses nginx Map) proxy_set_header Cache-Control $limit_http_cache_control; proxy_set_header Pragma $limit_http_pragma;