Merge pull request #531 from ckaenzig/optional-proxy-http-version
Allow disabling proxy_http_version directive
This commit is contained in:
commit
be30b57531
3 changed files with 12 additions and 3 deletions
|
@ -71,7 +71,7 @@ class nginx::config(
|
|||
$proxy_cache_path = false,
|
||||
$proxy_connect_timeout = '90',
|
||||
$proxy_headers_hash_bucket_size = '64',
|
||||
$proxy_http_version = '1.0',
|
||||
$proxy_http_version = undef,
|
||||
$proxy_read_timeout = '90',
|
||||
$proxy_redirect = 'off',
|
||||
$proxy_send_timeout = '90',
|
||||
|
@ -107,7 +107,9 @@ class nginx::config(
|
|||
}
|
||||
validate_string($multi_accept)
|
||||
validate_array($proxy_set_header)
|
||||
validate_string($proxy_http_version)
|
||||
if ($proxy_http_version != undef) {
|
||||
validate_string($proxy_http_version)
|
||||
}
|
||||
validate_bool($confd_purge)
|
||||
validate_bool($vhost_purge)
|
||||
if ($proxy_cache_path != false) {
|
||||
|
|
|
@ -231,6 +231,12 @@ describe 'nginx::config' do
|
|||
:value => '1.1',
|
||||
:match => 'proxy_http_version 1.1;',
|
||||
},
|
||||
{
|
||||
:title => 'should not set proxy_http_version',
|
||||
:attr => 'proxy_http_version',
|
||||
:value => nil,
|
||||
:notmatch => 'proxy_http_version',
|
||||
},
|
||||
{
|
||||
:title => 'should contain ordered appended directives',
|
||||
:attr => 'proxy_set_header',
|
||||
|
|
|
@ -8,7 +8,8 @@ proxy_send_timeout <%= @proxy_send_timeout %>;
|
|||
proxy_read_timeout <%= @proxy_read_timeout %>;
|
||||
proxy_buffers <%= @proxy_buffers %>;
|
||||
proxy_buffer_size <%= @proxy_buffer_size %>;
|
||||
proxy_http_version <%= @proxy_http_version %>;
|
||||
<% if @proxy_http_version -%>
|
||||
proxy_http_version <%= @proxy_http_version %>;<% end %>
|
||||
<% @proxy_set_header.each do |header| %>
|
||||
proxy_set_header <%= header %>;<% end %>
|
||||
proxy_headers_hash_bucket_size <%= @proxy_headers_hash_bucket_size %>;
|
||||
|
|
Loading…
Reference in a new issue