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 proxy_request_buffering parameter to location & vhost #1380

Merged
merged 1 commit into from
May 1, 2020
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
3 changes: 3 additions & 0 deletions manifests/resource/location.pp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@
# [*proxy_set_body*] - If defined, sets the body passed to the backend.
# [*proxy_buffering*] - If defined, sets the proxy_buffering to the passed
# value.
# [*proxy_request_buffering*] - If defined, sets the proxy_request_buffering to the passed
# value.
# [*proxy_max_temp_file_size*] - Sets the maximum size of the temporary buffer file.
# [*proxy_busy_buffers_size*] - Sets the total size of buffers that can be
# busy sending a response to the client while the response is not yet fully read.
Expand Down Expand Up @@ -240,6 +242,7 @@
Optional[String] $proxy_http_version = undef,
Optional[String] $proxy_set_body = undef,
Optional[Enum['on', 'off']] $proxy_buffering = undef,
Optional[Enum['on', 'off']] $proxy_request_buffering = undef,
Optional[Nginx::Size] $proxy_max_temp_file_size = undef,
Optional[Nginx::Size] $proxy_busy_buffers_size = undef,
Optional[Enum['on', 'off']] $absolute_redirect = undef,
Expand Down
3 changes: 3 additions & 0 deletions manifests/resource/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
# [*proxy_send_timeout*] - Override the default proxy send timeout value of 90 seconds
# [*proxy_redirect*] - Override the default proxy_redirect value of off.
# [*proxy_buffering*] - If defined, sets the proxy_buffering to the passed value.
# [*proxy_request_buffering*] - If defined, sets the proxy_request_buffering to the passed value.
# [*proxy_max_temp_file_size*] - Sets the maximum size of the temporary buffer file.
# [*proxy_busy_buffers_size*] - Sets the total size of buffers that can be
# busy sending a response to the client while the response is not yet fully read.
Expand Down Expand Up @@ -213,6 +214,7 @@
Optional[String] $proxy_http_version = undef,
Optional[String] $proxy_set_body = undef,
Optional[String] $proxy_buffering = undef,
Optional[String] $proxy_request_buffering = undef,
Optional[Nginx::Size] $proxy_max_temp_file_size = undef,
Optional[Nginx::Size] $proxy_busy_buffers_size = undef,
Array $resolver = [],
Expand Down Expand Up @@ -392,6 +394,7 @@
proxy_set_body => $proxy_set_body,
proxy_cache_bypass => $proxy_cache_bypass,
proxy_buffering => $proxy_buffering,
proxy_request_buffering => $proxy_request_buffering,
proxy_busy_buffers_size => $proxy_busy_buffers_size,
proxy_max_temp_file_size => $proxy_max_temp_file_size,
fastcgi => $fastcgi,
Expand Down
6 changes: 6 additions & 0 deletions spec/defines/resource_location_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,12 @@
value: 'on',
match: %r{\s+proxy_buffering\s+on;}
},
{
title: 'should set proxy_request_buffering',
attr: 'proxy_request_buffering',
value: 'on',
match: %r{\s+proxy_request_buffering\s+on;}
},
{
title: 'should set proxy_max_temp_file_size',
attr: 'proxy_max_temp_file_size',
Expand Down
3 changes: 3 additions & 0 deletions templates/server/locations/proxy.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
<% if @proxy_buffering -%>
proxy_buffering <%= @proxy_buffering %>;
<% end -%>
<% if @proxy_request_buffering -%>
proxy_request_buffering <%= @proxy_request_buffering %>;
<% end -%>
<% if @proxy_busy_buffers_size -%>
proxy_busy_buffers_size <%= @proxy_busy_buffers_size %>;
<% end -%>
Expand Down