Skip to content
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
36 changes: 36 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1982,6 +1982,8 @@ The following parameters are available in the `nginx::resource::location` define
* [`proxy_pass_header`](#-nginx--resource--location--proxy_pass_header)
* [`proxy_ignore_header`](#-nginx--resource--location--proxy_ignore_header)
* [`proxy_next_upstream`](#-nginx--resource--location--proxy_next_upstream)
* [`proxy_next_upstream_tries`](#-nginx--resource--location--proxy_next_upstream_tries)
* [`proxy_next_upstream_timeout`](#-nginx--resource--location--proxy_next_upstream_timeout)
* [`grpc`](#-nginx--resource--location--grpc)
* [`fastcgi`](#-nginx--resource--location--fastcgi)
* [`fastcgi_param`](#-nginx--resource--location--fastcgi_param)
Expand Down Expand Up @@ -2251,6 +2253,22 @@ Specify cases a request should be passed to the next server in the upstream.

Default value: `undef`

##### <a name="-nginx--resource--location--proxy_next_upstream_tries"></a>`proxy_next_upstream_tries`

Data type: `Optional[Integer]`

Specify the limits the number of possible tries for passing a request to the next server.

Default value: `undef`

##### <a name="-nginx--resource--location--proxy_next_upstream_timeout"></a>`proxy_next_upstream_timeout`

Data type: `Optional[Nginx::Time]`

Specify the limits the time during which a request can be passed to the next server

Default value: `undef`

##### <a name="-nginx--resource--location--grpc"></a>`grpc`

Data type: `Optional[String]`
Expand Down Expand Up @@ -3509,6 +3527,8 @@ The following parameters are available in the `nginx::resource::server` defined
* [`proxy_max_temp_file_size`](#-nginx--resource--server--proxy_max_temp_file_size)
* [`proxy_busy_buffers_size`](#-nginx--resource--server--proxy_busy_buffers_size)
* [`proxy_next_upstream`](#-nginx--resource--server--proxy_next_upstream)
* [`proxy_next_upstream_tries`](#-nginx--resource--server--proxy_next_upstream_tries)
* [`proxy_next_upstream_timeout`](#-nginx--resource--server--proxy_next_upstream_timeout)
* [`grpc`](#-nginx--resource--server--grpc)
* [`resolver`](#-nginx--resource--server--resolver)
* [`fastcgi`](#-nginx--resource--server--fastcgi)
Expand Down Expand Up @@ -3938,6 +3958,22 @@ Specify cases a request should be passed to the next server in the upstream.

Default value: `undef`

##### <a name="-nginx--resource--server--proxy_next_upstream_tries"></a>`proxy_next_upstream_tries`

Data type: `Optional[Integer]`

Specify the limits the number of possible tries for passing a request to the next server.

Default value: `undef`

##### <a name="-nginx--resource--server--proxy_next_upstream_timeout"></a>`proxy_next_upstream_timeout`

Data type: `Optional[Nginx::Time]`

Specify the limits the time during which a request can be passed to the next server

Default value: `undef`

##### <a name="-nginx--resource--server--grpc"></a>`grpc`

Data type: `Optional[String]`
Expand Down
6 changes: 6 additions & 0 deletions manifests/resource/location.pp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
# Array of server headers to ignore
# @param proxy_next_upstream
# Specify cases a request should be passed to the next server in the upstream.
# @param proxy_next_upstream_tries
# Specify the limits the number of possible tries for passing a request to the next server.
# @param proxy_next_upstream_timeout
# Specify the limits the time during which a request can be passed to the next server
# @param grpc
# Sets the gRPC server address (`grpc_pass`)
# @param fastcgi
Expand Down Expand Up @@ -307,6 +311,8 @@
Array $proxy_pass_header = $nginx::proxy_pass_header,
Array $proxy_ignore_header = $nginx::proxy_ignore_header,
Optional[String] $proxy_next_upstream = undef,
Optional[Integer] $proxy_next_upstream_tries = undef,
Optional[Nginx::Time] $proxy_next_upstream_timeout = undef,
Optional[String] $grpc = undef,
Optional[String] $fastcgi = undef,
Optional[String] $fastcgi_index = undef,
Expand Down
8 changes: 8 additions & 0 deletions manifests/resource/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@
# client while the response is not yet fully read.
# @param proxy_next_upstream
# Specify cases a request should be passed to the next server in the upstream.
# @param proxy_next_upstream_tries
# Specify the limits the number of possible tries for passing a request to the next server.
# @param proxy_next_upstream_timeout
# Specify the limits the time during which a request can be passed to the next server
# @param grpc
# Sets the gRPC server address (`grpc_pass`)
# @param resolver
Expand Down Expand Up @@ -374,6 +378,8 @@
Array[String] $proxy_hide_header = $nginx::proxy_hide_header,
Array[String] $proxy_pass_header = $nginx::proxy_pass_header,
Optional[String[1]] $proxy_next_upstream = undef,
Optional[Integer] $proxy_next_upstream_tries = undef,
Optional[Nginx::Time] $proxy_next_upstream_timeout = undef,
Optional[String] $proxy_cache = undef,
Optional[String] $proxy_cache_key = undef,
Optional[String] $proxy_cache_use_stale = undef,
Expand Down Expand Up @@ -585,6 +591,8 @@
proxy_busy_buffers_size => $proxy_busy_buffers_size,
proxy_max_temp_file_size => $proxy_max_temp_file_size,
proxy_next_upstream => $proxy_next_upstream,
proxy_next_upstream_tries => $proxy_next_upstream_tries,
proxy_next_upstream_timeout => $proxy_next_upstream_timeout,
grpc => $grpc,
fastcgi => $fastcgi,
fastcgi_index => $fastcgi_index,
Expand Down
6 changes: 6 additions & 0 deletions templates/server/locations/proxy.erb
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,10 @@
<% if @proxy_next_upstream -%>
proxy_next_upstream <%= @proxy_next_upstream %>;
<% end -%>
<% if @proxy_next_upstream_tries -%>
proxy_next_upstream_tries <%= @proxy_next_upstream_tries %>;
<% end -%>
<% if @proxy_next_upstream_timeout -%>
proxy_next_upstream_timeout <%= @proxy_next_upstream_timeout %>;
<% end -%>
<% end -%>
Loading