Skip to content

Commit

Permalink
Supporting proxy_http_version within locations
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Garcia committed Oct 6, 2015
1 parent 27da00a commit 330a393
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions manifests/resource/location.pp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
# different replies.
# [*proxy_method*] - If defined, overrides the HTTP method of the
# request to be passed to the backend.
# [*proxy_http_version*] - Sets the proxy http version
# [*proxy_set_body*] - If defined, sets the body passed to the backend.
# [*auth_basic*] - This directive includes testing name and password
# with HTTP Basic Authentication.
Expand Down Expand Up @@ -174,6 +175,7 @@
$proxy_cache_use_stale = undef,
$proxy_cache_valid = false,
$proxy_method = undef,
$proxy_http_version = undef,
$proxy_set_body = undef,
$auth_basic = undef,
$auth_basic_user_file = undef,
Expand Down Expand Up @@ -295,6 +297,9 @@
if ($proxy_method != undef) {
validate_string($proxy_method)
}
if ($proxy_http_version != undef) {
validate_string($proxy_http_version)
}
if ($proxy_set_body != undef) {
validate_string($proxy_set_body)
}
Expand Down
6 changes: 6 additions & 0 deletions manifests/resource/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
# different replies.
# [*proxy_method*] - If defined, overrides the HTTP method of the
# request to be passed to the backend.
# [*proxy_http_version*] - Sets the proxy http version
# [*proxy_set_body*] - If defined, sets the body passed to the backend.
# [*auth_basic*] - This directive includes testing name and
# password with HTTP Basic Authentication.
Expand Down Expand Up @@ -205,6 +206,7 @@
$proxy_cache_use_stale = undef,
$proxy_cache_valid = false,
$proxy_method = undef,
$proxy_http_version = undef,
$proxy_set_body = undef,
$resolver = [],
$fastcgi = undef,
Expand Down Expand Up @@ -345,6 +347,9 @@
if ($proxy_method != undef) {
validate_string($proxy_method)
}
if ($proxy_http_version != undef) {
validate_string($proxy_http_version)
}
if ($proxy_set_body != undef) {
validate_string($proxy_set_body)
}
Expand Down Expand Up @@ -550,6 +555,7 @@
proxy_cache_use_stale => $proxy_cache_use_stale,
proxy_cache_valid => $proxy_cache_valid,
proxy_method => $proxy_method,
proxy_http_version => $proxy_http_version,
proxy_set_header => $proxy_set_header,
proxy_set_body => $proxy_set_body,
fastcgi => $fastcgi,
Expand Down
3 changes: 3 additions & 0 deletions templates/vhost/locations/proxy.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
proxy_read_timeout <%= @proxy_read_timeout %>;
proxy_connect_timeout <%= @proxy_connect_timeout %>;
proxy_redirect <%= @proxy_redirect %>;
<% if @proxy_http_version -%>
proxy_http_version <%= @proxy_http_version %>;
<% end -%>
<% if @proxy_method -%>
proxy_method <%= @proxy_method %>;
<% end -%>
Expand Down

0 comments on commit 330a393

Please sign in to comment.