-
- # Get the real remote IP for requests via a trusted proxy
- RemoteIPHeader Fastly-Client-IP
-<% @fastly.sort.each do |address| -%>
- RemoteIPTrustedProxy <%= address %>
-<% end -%>
-
- # Enforce rate limits
- RewriteMap ipmap txt:/srv/tile.openstreetmap.org/conf/ip.map
- RewriteCond ${ipmap:%{REMOTE_ADDR}} ^.+$
- RewriteRule ^.*$ /${ipmap:%{REMOTE_ADDR}} [PT]
-
- # Internal endpoint for blocked users
- <Location /blocked>
- Header always set Cache-Control private
- Redirect 429
- </Location>