module-nginx/templates/vhost/locations/proxy.erb
Carl P. Corliss fb880576a6 cleanup resultant whitespace and key/value alignment in config files
- fix tests related to whitespace changes
2014-09-13 04:13:18 -04:00

38 lines
1.1 KiB
Text

proxy_pass <%= @proxy %>;
proxy_read_timeout <%= @proxy_read_timeout %>;
proxy_connect_timeout <%= @proxy_connect_timeout %>;
proxy_redirect <%= @proxy_redirect %>;
<% if @proxy_method -%>
proxy_method <%= @proxy_method %>;
<% end -%>
<% if @proxy_set_body -%>
proxy_set_body <%= @proxy_set_body %>;
<% end -%>
<% unless @proxy_set_header.nil? -%>
<%- @proxy_set_header.each do |header| -%>
proxy_set_header <%= header %>;
<%- end -%>
<% end -%>
<% if @proxy_cache -%>
proxy_cache <%= @proxy_cache %>;
<% end -%>
<% if @proxy_cache_valid -%>
proxy_cache_valid <%= @proxy_cache_valid %>;
<% end -%>
<%- unless @rewrite_rules.nil? || @rewrite_rules.empty? -%>
<%- @rewrite_rules.each do |rewrite_rule| -%>
rewrite <%= rewrite_rule %>;
<%- end -%>
<% end -%>
<% if instance_variables.any? { |iv| iv.to_s.include? 'auth_basic' } -%>
<%- if @auth_basic -%>
auth_basic "<%= @auth_basic %>";
<%- end -%>
<%- if defined? @auth_basic_user_file -%>
auth_basic_user_file <%= @auth_basic_user_file %>;
<%- end -%>
<% end -%>