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

Allow disabling proxy_http_version directive #531

Merged
merged 2 commits into from
Dec 18, 2014
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@
}
validate_string($multi_accept)
validate_array($proxy_set_header)
validate_string($proxy_http_version)
if ($proxy_http_version != false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you make this if ($proxy_http_version != undef)?

At the moment most other parameters that cause directives to be removed from the config files check for an undef value.

validate_string($proxy_http_version)
}
validate_bool($confd_purge)
validate_bool($vhost_purge)
if ($proxy_cache_path != false) {
Expand Down
3 changes: 2 additions & 1 deletion templates/conf.d/proxy.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ proxy_send_timeout <%= @proxy_send_timeout %>;
proxy_read_timeout <%= @proxy_read_timeout %>;
proxy_buffers <%= @proxy_buffers %>;
proxy_buffer_size <%= @proxy_buffer_size %>;
proxy_http_version <%= @proxy_http_version %>;
<% if @proxy_http_version -%>
proxy_http_version <%= @proxy_http_version %>;<% end %>
<% @proxy_set_header.each do |header| %>
proxy_set_header <%= header %>;<% end %>
proxy_headers_hash_bucket_size <%= @proxy_headers_hash_bucket_size %>;