diff --git a/manifests/init.pp b/manifests/init.pp index 7c1b468ac..82cb8b618 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -122,6 +122,7 @@ ], Array $proxy_hide_header = [], Array $proxy_pass_header = [], + Array $proxy_ignore_header = [], $sendfile = 'on', String $server_tokens = 'on', $spdy = 'off', diff --git a/manifests/resource/location.pp b/manifests/resource/location.pp index bc14cb469..397cd50bf 100644 --- a/manifests/resource/location.pp +++ b/manifests/resource/location.pp @@ -30,9 +30,13 @@ # value of 90 seconds # [*proxy_connect_timeout*] - Override the default the proxy connect timeout # value of 90 seconds +# [*proxy_send_timeout*] - Override the default the proxy send timeout +# value of 90 seconds # [*proxy_set_header*] - Array of server headers to set # [*proxy_hide_header*] - Array of server headers to hide # [*proxy_pass_header*] - Array of server headers to pass +# [*proxy_ignore_header*] - Array of server headers to ignore +# [*proxy_next_upstream*] - Specify cases a request should be passed to the next server in the upstream. # [*fastcgi*] - location of fastcgi (host:port) # [*fastcgi_param*] - Set additional custom fastcgi_params # [*fastcgi_params*] - optional alternative fastcgi_params file to use @@ -170,9 +174,12 @@ Optional[String] $proxy_redirect = $::nginx::proxy_redirect, String $proxy_read_timeout = $::nginx::proxy_read_timeout, String $proxy_connect_timeout = $::nginx::proxy_connect_timeout, + String $proxy_send_timeout = $::nginx::proxy_send_timeout, Array $proxy_set_header = $::nginx::proxy_set_header, Array $proxy_hide_header = $::nginx::proxy_hide_header, Array $proxy_pass_header = $::nginx::proxy_pass_header, + Array $proxy_ignore_header = $::nginx::proxy_ignore_header, + Optional[String] $proxy_next_upstream = undef, Optional[String] $fastcgi = undef, Optional[String] $fastcgi_index = undef, Optional[Hash] $fastcgi_param = undef, diff --git a/templates/server/locations/proxy.erb b/templates/server/locations/proxy.erb index ec74e4cc5..04bdc7ba4 100644 --- a/templates/server/locations/proxy.erb +++ b/templates/server/locations/proxy.erb @@ -2,6 +2,7 @@ proxy_pass <%= @proxy %>; proxy_read_timeout <%= @proxy_read_timeout %>; proxy_connect_timeout <%= @proxy_connect_timeout %>; + proxy_send_timeout <%= @proxy_send_timeout %>; <% if @proxy_redirect -%> proxy_redirect <%= @proxy_redirect %>; <% end -%> @@ -27,6 +28,11 @@ proxy_hide_header <%= header %>; <%- end -%> <% end -%> +<% unless @proxy_ignore_header.nil? -%> + <%- @proxy_ignore_header.each do |header| -%> + proxy_ignore_headers <%= header %>; + <%- end -%> +<% end -%> <% unless @proxy_pass_header.nil? -%> <%- @proxy_pass_header.each do |header| -%> proxy_pass_header <%= header %>; @@ -54,4 +60,7 @@ <% if @proxy_cache_lock -%> proxy_cache_lock <%= @proxy_cache_lock %>; <% end -%> +<% if @proxy_next_upstream -%> + proxy_next_upstream <%= @proxy_next_upstream %>; +<% end -%> <% end -%>