Merge pull request #282 from genehand/master

Make proxy_redirect configurable
This commit is contained in:
James Fryman 2014-04-06 09:42:49 -05:00
commit e95a3abd46
3 changed files with 4 additions and 1 deletions

View file

@ -40,6 +40,7 @@ class nginx::config(
$gzip = $nginx::params::nx_gzip, $gzip = $nginx::params::nx_gzip,
$conf_template = $nginx::params::nx_conf_template, $conf_template = $nginx::params::nx_conf_template,
$proxy_conf_template = $nginx::params::nx_proxy_conf_template, $proxy_conf_template = $nginx::params::nx_proxy_conf_template,
$proxy_redirect = $nginx::params::nx_proxy_redirect,
) inherits nginx::params { ) inherits nginx::params {
File { File {

View file

@ -60,6 +60,7 @@ class nginx (
$gzip = $nginx::params::nx_gzip, $gzip = $nginx::params::nx_gzip,
$conf_template = $nginx::params::nx_conf_template, $conf_template = $nginx::params::nx_conf_template,
$proxy_conf_template = $nginx::params::nx_proxy_conf_template, $proxy_conf_template = $nginx::params::nx_proxy_conf_template,
$proxy_redirect = $nginx::params::nx_proxy_redirect,
$nginx_vhosts = {}, $nginx_vhosts = {},
$nginx_upstreams = {}, $nginx_upstreams = {},
$nginx_locations = {}, $nginx_locations = {},
@ -149,6 +150,7 @@ class nginx (
gzip => $gzip, gzip => $gzip,
conf_template => $conf_template, conf_template => $conf_template,
proxy_conf_template => $proxy_conf_template, proxy_conf_template => $proxy_conf_template,
proxy_redirect => $proxy_redirect,
require => Class['nginx::package'], require => Class['nginx::package'],
notify => Class['nginx::service'], notify => Class['nginx::service'],
} }

View file

@ -1,4 +1,4 @@
proxy_redirect <%= scope.lookupvar('nginx::params::nx_proxy_redirect') %>; proxy_redirect <%= @proxy_redirect %>;
client_max_body_size <%= @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') %>; 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_connect_timeout <%= scope.lookupvar('nginx::params::nx_proxy_connect_timeout') %>;