Allow basic_auth for proxy locations and introducing parameter proxy_headers_hash_bucket_size with default of 64

This commit is contained in:
Daniel Kerwin 2014-05-15 15:29:59 +02:00
parent 35a71ad2d3
commit d11c6be681
5 changed files with 136 additions and 126 deletions

View file

@ -48,6 +48,7 @@ class nginx::config(
$conf_template = $nginx::params::nx_conf_template,
$proxy_conf_template = $nginx::params::nx_proxy_conf_template,
$proxy_redirect = $nginx::params::nx_proxy_redirect,
$proxy_headers_hash_bucket_size = $nginx::params::nx_proxy_headers_hash_bucket_size,
) inherits nginx::params {
File {

View file

@ -68,6 +68,7 @@ class nginx (
$conf_template = $nginx::params::nx_conf_template,
$proxy_conf_template = $nginx::params::nx_proxy_conf_template,
$proxy_redirect = $nginx::params::nx_proxy_redirect,
$proxy_headers_hash_bucket_size = $nginx::params::nx_proxy_headers_hash_bucket_size,
$nginx_vhosts = {},
$nginx_upstreams = {},
$nginx_locations = {},

View file

@ -71,6 +71,7 @@ class nginx::params {
$nx_proxy_buffers = '32 4k'
$nx_proxy_http_version = '1.0'
$nx_proxy_buffer_size = '8k'
$nx_proxy_headers_hash_bucket_size = '64'
$nx_logdir = $::kernel ? {
/(?i-mx:linux)/ => '/var/log/nginx',

View file

@ -9,3 +9,4 @@ proxy_buffer_size <%= @proxy_buffer_size %>;
proxy_http_version <%= @proxy_http_version %>;
<% @proxy_set_header.each do |header| %>
proxy_set_header <%= header %>;<% end %>
proxy_headers_hash_bucket_size <%= @proxy_headers_hash_bucket_size %>;

View file

@ -47,6 +47,12 @@
<% @rewrite_rules.each do |rewrite_rule| -%>
rewrite <%= rewrite_rule %>;
<% end -%>
<% if defined? @auth_basic -%>
auth_basic "<%= @auth_basic %>";
<% end -%>
<% if defined? @auth_basic_user_file -%>
auth_basic_user_file <%= @auth_basic_user_file %>;
<% end -%>
<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%>
<% Array(subvalue).each do |asubvalue| -%>