2013-07-17 20:42:57 +02:00
|
|
|
upstream <%= @name %> {
|
2013-11-10 23:59:11 +01:00
|
|
|
<% if @upstream_cfg_prepend -%><% @upstream_cfg_prepend.sort_by{|k,v| k}.each do |key,value| %>
|
2014-03-12 09:06:47 +01:00
|
|
|
<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%>
|
|
|
|
<% Array(subvalue).each do |asubvalue| -%>
|
|
|
|
<%= key %> <%= subkey %> <%= asubvalue %>;
|
|
|
|
<% end -%>
|
|
|
|
<% end -%><% else -%>
|
|
|
|
<% Array(value).each do |asubvalue| -%>
|
|
|
|
<%= key %> <%= asubvalue %>;
|
|
|
|
<% end -%>
|
|
|
|
<% end -%>
|
2013-11-22 05:04:39 +01:00
|
|
|
<% end -%><% end -%>
|