]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tile/templates/default/apache.erb
Get real tile source from Fastly-Client-IP for new tile CDN
[chef.git] / cookbooks / tile / templates / default / apache.erb
index 0e461b8d60c0d006a6edd6a02e222500e4afb62b..a34f2b5d14357ff241718ac439808f9a2098aa08 100644 (file)
   ScriptAlias /cgi-bin/ /srv/tile.openstreetmap.org/cgi-bin/
 
   # Get the real remote IP for requests via a trusted proxy
-  RemoteIPHeader X-Forwarded-For
-<% @caches.each do |cache| -%>
-<% cache.ipaddresses(:role => :external).sort.each do |address| -%>
+  RemoteIPHeader Fastly-Client-IP
+<% @fastly.sort.each do |address| -%>
   RemoteIPTrustedProxy <%= address %>
-<% end -%>
 <% end -%>
 
   # Setup logging
   ServerAlias render.openstreetmap.org
   ServerAdmin webmaster@openstreetmap.org
 
-  # Get the real remote IP for requests via a trusted proxy
-  RemoteIPHeader X-Forwarded-For
-<% @caches.each do |cache| -%>
-<% cache.ipaddresses(:role => :external).sort.each do |address| -%>
-  RemoteIPTrustedProxy <%= address %>
-<% end -%>
-<% end -%>
-
   # Setup logging
   LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined_with_remoteip
   CustomLog /var/log/apache2/access.log combined_with_remoteip