From f27d4f87302144426d85c8b92913a97d839d7dd4 Mon Sep 17 00:00:00 2001 From: Martin Konrad Date: Fri, 6 Jun 2014 22:23:19 -0400 Subject: [PATCH] Support parameters along with proxy_pass --- README.md | 4 +++- templates/vhost/_proxy.erb | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 02932ff34..a2f2a4e56 100644 --- a/README.md +++ b/README.md @@ -1128,7 +1128,7 @@ Specifies the destination address of a [ProxyPass](http://httpd.apache.org/docs/ #####`proxy_pass` -Specifies an array of `path => URI` for a [ProxyPass](http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass) configuration. Defaults to 'undef'. +Specifies an array of `path => URI` for a [ProxyPass](http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass) configuration. Defaults to 'undef'. Optionally parameters can be added as an array. ```puppet apache::vhost { 'site.name.fdqn': @@ -1139,6 +1139,8 @@ apache::vhost { 'site.name.fdqn': { 'path' => '/c', 'url' => 'http://backend-a/c', 'params' => 'max=20 ttl=120 retry=300' }, { 'path' => '/l', 'url' => 'http://backend-xy', 'reverse_urls' => ['http://backend-x', 'http://backend-y'] }, + { 'path' => '/d', 'url' => 'http://backend-a/d', + 'params' => ['retry=0', 'timeout=5'] }, ], } ``` diff --git a/templates/vhost/_proxy.erb b/templates/vhost/_proxy.erb index 190239de9..847715795 100644 --- a/templates/vhost/_proxy.erb +++ b/templates/vhost/_proxy.erb @@ -8,7 +8,6 @@ <%- end -%> <%- [@proxy_pass].flatten.compact.each do |proxy| -%> ProxyPass <%= proxy['path'] %> <%= proxy['url'] %> <%- if !proxy['params'].nil? -%> <%= proxy['params'] %> <%- end -%> - > <%- if proxy['reverse_urls'].nil? -%> ProxyPassReverse <%= proxy['url'] %>