Disable proxy_http_version directive by default
The default value in nginx::config was the same as nginx's default, so it's not necessary to be set in any version of nginx unless one needs a specific value. This also allows us to use undef when we don't want the directive to be set instead of false. Also added a test for the default case.
This commit is contained in:
parent
7432862fe8
commit
6a4e4b4e73
2 changed files with 8 additions and 2 deletions
|
@ -70,7 +70,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',
|
||||
|
@ -106,7 +106,7 @@ class nginx::config(
|
|||
}
|
||||
validate_string($multi_accept)
|
||||
validate_array($proxy_set_header)
|
||||
if ($proxy_http_version != false) {
|
||||
if ($proxy_http_version != undef) {
|
||||
validate_string($proxy_http_version)
|
||||
}
|
||||
validate_bool($confd_purge)
|
||||
|
|
|
@ -287,6 +287,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',
|
||||
|
|
Loading…
Reference in a new issue