Skip to content

Commit 018247c

Browse files
committed
Add proxy_http_version
1 parent 077308f commit 018247c

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

manifests/resource/location.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
$proxy_read_timeout = '90',
4949
$proxy_set_header = ['Host $host', 'X-Real-IP $remote_addr', 'X-Forwarded-For $proxy_add_x_forwarded_for', 'X-Forwarded-Proto $scheme' ],
5050
$proxy_redirect = undef,
51+
$proxy_http_version = undef,
5152
$ssl = false,
5253
$ssl_only = false,
5354
$option = undef,

manifests/resource/vhost.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
$proxy = undef,
5757
$proxy_read_timeout = '90',
5858
$proxy_set_header = undef,
59+
$proxy_http_version = undef,
5960
$proxy_redirect = undef,
6061
$redirect = undef,
6162
$index_files = ['index.html', 'index.htm', 'index.php'],
@@ -150,6 +151,7 @@
150151
proxy_read_timeout => $proxy_read_timeout,
151152
proxy_set_header => $proxy_set_header,
152153
proxy_redirect => $proxy_redirect,
154+
proxy_http_version => $proxy_http_version,
153155
redirect => $redirect,
154156
www_root => $www_root,
155157
create_www_root => $create_www_root,

templates/conf.d/proxy.conf.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ proxy_buffers <%= scope.lookupvar('nginx::params::nx_proxy_buffers') %
88
<% scope.lookupvar('nginx::params::nx_proxy_set_header').each do |header| %>
99
proxy_set_header <%= header %>;
1010
<% end %>
11+
<% unless @nx_proxy_http_version.nil? || @nx_proxy_http_version.empty? -%>proxy_http_version <%= scope.lookupvar('nginx::params::nx_proxy_http_version') %>;<% end %>

templates/vhost/vhost_location_proxy.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
<% unless @proxy_redirect.nil? || @proxy_redirect.empty? -%>
55
proxy_redirect <%= @proxy_redirect %>;
66
<% end -%>
7+
<% unless @proxy_http_version.nil? || @proxy_http_version.empty? -%>
8+
proxy_http_version <%= @proxy_http_version %>;
9+
<% end %>
710
<% unless @proxy_set_header.nil? || @proxy_set_header.empty? -%>
811
<% @proxy_set_header.each do |header| -%>
912
proxy_set_header <%= header %>;

0 commit comments

Comments
 (0)