Skip to content

Commit

Permalink
Merge pull request voxpupuli#1183 from bryangwilliam/etag_support
Browse files Browse the repository at this point in the history
add etag support at the http level
  • Loading branch information
alexjfisher authored Feb 26, 2018
2 parents b5a5a26 + 26e07b4 commit 77e120b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
$client_body_timeout = $::nginx::client_body_timeout
$send_timeout = $::nginx::send_timeout
$lingering_timeout = $::nginx::lingering_timeout
$etag = $::nginx::etag
$events_use = $::nginx::events_use
$fastcgi_cache_inactive = $::nginx::fastcgi_cache_inactive
$fastcgi_cache_key = $::nginx::fastcgi_cache_key
Expand Down
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
$client_body_timeout = '60s',
$send_timeout = '60s',
$lingering_timeout = '5s',
Optional[Enum['on', 'off']] $etag = undef,
Optional[String] $events_use = undef,
String $fastcgi_cache_inactive = '20m',
Optional[String] $fastcgi_cache_key = undef,
Expand Down
6 changes: 6 additions & 0 deletions spec/classes/nginx_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,12 @@
value: 'off',
notmatch: %r{multi_accept}
},
{
title: 'should set etag',
attr: 'etag',
value: 'off',
match: ' etag off;'
},
{
title: 'should set events_use',
attr: 'events_use',
Expand Down
4 changes: 4 additions & 0 deletions templates/conf.d/nginx.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ http {
lingering_timeout <%= @lingering_timeout %>;
tcp_nodelay <%= @http_tcp_nodelay %>;

<% if @etag -%>
etag <%= @etag %>;

<% end -%>
<% if @gzip == 'on' -%>
gzip on;
<% if @gzip_buffers -%>
Expand Down

0 comments on commit 77e120b

Please sign in to comment.