module-nginx/templates/vhost/locations/proxy.erb
Matthew Haughton 3027d9f35a location: move auth_basic directives to header
Allows setting these directives on any location:
* auth_basic
* auth_basic_user_file
2015-04-13 22:58:57 -04:00

23 lines
700 B
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 -%>