From fda2969c208079fdc69975bc25938d0f523cc948 Mon Sep 17 00:00:00 2001 From: Omar Tamer Date: Wed, 4 Sep 2013 17:37:18 +0100 Subject: [PATCH] make client_max_body_size configurable --- manifests/config.pp | 1 + manifests/init.pp | 2 ++ templates/conf.d/proxy.conf.erb | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/manifests/config.pp b/manifests/config.pp index 000afbe..24836d0 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -27,6 +27,7 @@ class nginx::config( $proxy_http_version = $nginx::params::nx_proxy_http_version, $types_hash_max_size = $nginx::params::nx_types_hash_max_size, $types_hash_bucket_size = $nginx::params::nx_types_hash_bucket_size, + $client_max_body_size = $nginx::params::nx_client_max_body_size, $http_cfg_append = $nginx::params::nx_http_cfg_append ) inherits nginx::params { File { diff --git a/manifests/init.pp b/manifests/init.pp index 49651fd..73079e6 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -43,6 +43,7 @@ class nginx ( $service_restart = $nginx::params::nx_service_restart, $mail = $nginx::params::nx_mail, $server_tokens = $nginx::params::nx_server_tokens, + $client_max_body_size = $nginx::params::nx_client_max_body_size, $http_cfg_append = $nginx::params::nx_http_cfg_append, $nginx_vhosts = {}, $nginx_upstreams = {}, @@ -67,6 +68,7 @@ class nginx ( proxy_cache_inactive => $proxy_cache_inactive, confd_purge => $confd_purge, server_tokens => $server_tokens, + client_max_body_size => $client_max_body_size, http_cfg_append => $http_cfg_append, require => Class['nginx::package'], notify => Class['nginx::service'], diff --git a/templates/conf.d/proxy.conf.erb b/templates/conf.d/proxy.conf.erb index 8225879..b1d9665 100644 --- a/templates/conf.d/proxy.conf.erb +++ b/templates/conf.d/proxy.conf.erb @@ -1,5 +1,5 @@ proxy_redirect <%= scope.lookupvar('nginx::params::nx_proxy_redirect') %>; -client_max_body_size <%= scope.lookupvar('nginx::params::nx_client_max_body_size') %>; +client_max_body_size <%= @client_max_body_size %>; client_body_buffer_size <%= scope.lookupvar('nginx::params::nx_client_body_buffer_size') %>; proxy_connect_timeout <%= scope.lookupvar('nginx::params::nx_proxy_connect_timeout') %>; proxy_send_timeout <%= scope.lookupvar('nginx::params::nx_proxy_send_timeout') %>;