X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/d25102f65d7659c8fc90144e05cfb35410f8eaf5..9624adf7d7b57952b4bba023188bde37c0c4730a:/cookbooks/tile/templates/default/apache.erb diff --git a/cookbooks/tile/templates/default/apache.erb b/cookbooks/tile/templates/default/apache.erb index 499de564f..182b590e5 100644 --- a/cookbooks/tile/templates/default/apache.erb +++ b/cookbooks/tile/templates/default/apache.erb @@ -2,7 +2,7 @@ # Basic server configuration - ServerName <%= node[:fqdn] %> + ServerName <%= node.name %> ServerAlias tile.openstreetmap.org ServerAlias render.openstreetmap.org ServerAdmin webmaster@openstreetmap.org @@ -38,7 +38,10 @@ Header set Access-Control-Allow-Origin "*" # Add diagnostics header to identify render server - Header set X-TileRender "<%= node[:hostname] %>" + Header set X-TileRender "<%= node.name %>" + + # Tell clients to use stale tiles if necessary + Header append Cache-Control "stale-while-revalidate=604800, stale-if-error=604800" "expr=%{CONTENT_TYPE} == 'image/png'" # Remove Proxy request header to mitigate https://httpoxy.org/ RequestHeader unset Proxy early @@ -62,7 +65,7 @@ # Basic server configuration - ServerName <%= node[:fqdn] %> + ServerName <%= node.name %> ServerAlias tile.openstreetmap.org ServerAlias render.openstreetmap.org ServerAdmin webmaster@openstreetmap.org @@ -86,7 +89,7 @@ Header set Access-Control-Allow-Origin "*" # Add diagnostics header to identify render server - Header set X-TileRender "<%= node[:hostname] %>" + Header set X-TileRender "<%= node.name %>" # Remove Proxy request header to mitigate https://httpoxy.org/ RequestHeader unset Proxy early