X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/647d76065793488df0ce9ed1840e5b8743f779ab..d18cd92a98384aebf371376383a4408485f12374:/cookbooks/web/templates/default/apache.frontend.erb diff --git a/cookbooks/web/templates/default/apache.frontend.erb b/cookbooks/web/templates/default/apache.frontend.erb index fb677769e..39f2a6007 100644 --- a/cookbooks/web/templates/default/apache.frontend.erb +++ b/cookbooks/web/templates/default/apache.frontend.erb @@ -26,6 +26,12 @@ ErrorLog /var/log/apache2/error.log SSLCertificateFile /etc/ssl/certs/www.openstreetmap.org.pem SSLCertificateKeyFile /etc/ssl/private/www.openstreetmap.org.key + # Get the real remote IP for requests via a trusted proxy + RemoteIPHeader CF-Connecting-IP +<% @cloudflare.sort.each do |address| -%> + RemoteIPTrustedProxy <%= address %> +<% end -%> + # # Turn on various features # @@ -117,7 +123,7 @@ ErrorLog /var/log/apache2/error.log FileETag Size ExpiresDefault "access plus 1 year" - Header set Cache-Control "immutable, max-age=31536000" + Header set Cache-Control "immutable, max-age=31536000" "expr=%{REQUEST_STATUS} == 200" #