dc3817f9ae
With credit to https://github.com/OmarzT
24 lines
813 B
Text
24 lines
813 B
Text
location <%= @location %> {
|
|
<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
|
|
<%= key %> <%= value %>;
|
|
<% end -%><% end -%>
|
|
<% if @proxy_cache -%>
|
|
proxy_cache <%= @proxy_cache %>;
|
|
proxy_cache_valid <%= @proxy_cache_valid %>;
|
|
<% end -%>
|
|
proxy_pass <%= @proxy %>;
|
|
proxy_read_timeout <%= @proxy_read_timeout %>;
|
|
<% if @proxy_method -%>
|
|
proxy_method <%= @proxy_method %>;
|
|
<% end -%>
|
|
<% if @proxy_set_body -%>
|
|
proxy_set_body <%= @proxy_set_body %>;
|
|
<% end -%>
|
|
<% @rewrite_rules.each do |rewrite_rule| -%>
|
|
rewrite <%= rewrite_rule %>;
|
|
<% end -%>
|
|
<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
|
|
<%= key %> <%= value %>;
|
|
<% end -%><% end -%>
|
|
}
|
|
|