Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add etag support at the http level #1183

Merged
merged 1 commit into from
Feb 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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