new proxy_cache_valid parameter validation
This commit is contained in:
parent
40d157482e
commit
e62342e779
2 changed files with 6 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue