# Configuration for making Zulip app frontends accept the
# X-Forwarded-For header used by proxies.  The trusted IP addresses
# here are set by `loadbalancer.ips` in /etc/zulip/zulip.conf.
#
# This causes us to update $remote_addr, which we use in logging, and
# also pass down to Zulip as X-Real-Ip.
real_ip_header X-Forwarded-For;
real_ip_recursive on;
<% @loadbalancers.each do |host| -%>
set_real_ip_from <%= host %>;
<%
end
-%>
