diff --git a/manifests/resource/location.pp b/manifests/resource/location.pp index aea8119..66c1e65 100644 --- a/manifests/resource/location.pp +++ b/manifests/resource/location.pp @@ -296,7 +296,9 @@ define nginx::resource::location ( validate_string($proxy_cache_use_stale) } if ($proxy_cache_valid != false) { - validate_slength(any2array($proxy_cache_valid),12,1) + if !(is_array($proxy_cache_valid) or is_string($proxy_cache_valid)) { + fail('$proxy_cache_valid must be a string or an array or false.') + } } if ($proxy_method != undef) { validate_string($proxy_method) diff --git a/manifests/resource/vhost.pp b/manifests/resource/vhost.pp index af4e700..80c9646 100644 --- a/manifests/resource/vhost.pp +++ b/manifests/resource/vhost.pp @@ -372,7 +372,9 @@ define nginx::resource::vhost ( validate_string($proxy_cache_use_stale) } if ($proxy_cache_valid != false) { - validate_slength(any2array($proxy_cache_valid),12,1) + if !(is_array($proxy_cache_valid) or is_string($proxy_cache_valid)) { + fail('$proxy_cache_valid must be a string or an array or false.') + } } if ($proxy_method != undef) { validate_string($proxy_method)