From e36aa73b6eb5fe7473507fa828a8e8e8157ee7ca Mon Sep 17 00:00:00 2001 From: Maurits Landewers Date: Fri, 17 Jan 2014 10:29:56 +0100 Subject: [PATCH] Make gzip configurable --- manifests/init.pp | 1 + templates/conf.d/nginx.conf.erb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 3f17d1a..5eeac1c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -54,6 +54,7 @@ class nginx ( $http_cfg_append = $nginx::params::nx_http_cfg_append, $nginx_error_log = $nginx::params::nx_nginx_error_log, $http_access_log = $nginx::params::nx_http_access_log, + $gzip = $nginx::params::nx_gzip, $nginx_vhosts = {}, $nginx_upstreams = {}, $nginx_locations = {}, diff --git a/templates/conf.d/nginx.conf.erb b/templates/conf.d/nginx.conf.erb index 1a26afc..1b8502e 100644 --- a/templates/conf.d/nginx.conf.erb +++ b/templates/conf.d/nginx.conf.erb @@ -30,7 +30,7 @@ http { keepalive_timeout <%= scope.lookupvar('nginx::params::nx_keepalive_timeout')%>; tcp_nodelay <%= scope.lookupvar('nginx::params::nx_tcp_nodelay')%>; -<% if scope.lookupvar('nginx::params::nx_gzip') == 'on' %> +<% if @gzip == 'on' %> gzip on; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; <% end -%>