Fix erb iteration

This commit is contained in:
Patrik Lundin 2024-10-10 15:45:58 +02:00
parent bacdb2c90a
commit 802e9a1389
Signed by: patlu
GPG key ID: A0A812BA2249F294

View file

@ -43,8 +43,8 @@ listen haproxy_https
bind /shared/haproxy_https accept-proxy mode 640 bind /shared/haproxy_https accept-proxy mode 640
stick-table type ip size 100 stick-table type ip size 100
stick on dst stick on dst
<% @cache_secrets['customers'][@customer]['origins'].each do |index, origin_ip| -%> <% @cache_secrets['customers'][@customer]['origins'].each_with_index do |origin, index| -%>
server s<%= index %> <%= origin_ip %>:443 ssl ca-file /etc/ssl/certs/ca-certificates.crt alpn http/1.1 sni fc_pp_authority server s<%= index %> <%= origin %>:443 ssl ca-file /etc/ssl/certs/ca-certificates.crt alpn http/1.1 sni fc_pp_authority
<% end -%> <% end -%>
# While varnish could recach out to HTTP backends itself, lets stick to one # While varnish could recach out to HTTP backends itself, lets stick to one
@ -56,6 +56,6 @@ listen haproxy_http
bind /shared/haproxy_http accept-proxy mode 640 bind /shared/haproxy_http accept-proxy mode 640
stick-table type ip size 100 stick-table type ip size 100
stick on dst stick on dst
<% @cache_secrets['customers'][@customer]['origins'].each do |index, origin_ip| -%> <% @cache_secrets['customers'][@customer]['origins'].each_with_index do |origin, index| -%>
server s<%= index %> <%= origin_ip %>:80 server s<%= index %> <%= origin %>:80
<% end -%> <% end -%>