Skip to content

Commit

Permalink
Merge pull request #434 from pablokbs/proxy_cache_valid_fix
Browse files Browse the repository at this point in the history
Removed proxy_cache_valid as default when using proxy_cache option
  • Loading branch information
3flex committed Sep 3, 2014
2 parents a931ef5 + ac1e9b7 commit 5c40510
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 13 additions & 1 deletion spec/defines/resource_location_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -530,13 +530,25 @@
:value => 'value',
:match => /^[ ]+proxy_cache\s+value;/,
},
{
:title => 'should not set proxy_cache_valid',
:attr => 'proxy_cache_valid',
:value => false,
:notmatch => /proxy_cache_valid\b/
},
{
:title => 'should set proxy_cache_valid',
:attr => 'proxy_cache_valid',
:value => 'value',
:match => /^[ ]+proxy_cache_valid\s+value;/,
},
{
:title => 'should not set proxy_cache',
:attr => 'proxy_cache',
:value => false,
:notmatch => /proxy_cache\b/
},
{
{
:title => 'should set proxy_pass',
:attr => 'proxy',
:value => 'value',
Expand Down
2 changes: 2 additions & 0 deletions templates/vhost/locations/proxy.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<% if @proxy_cache -%>
proxy_cache <%= @proxy_cache %>;
<% end -%>
<% if @proxy_cache_valid -%>
proxy_cache_valid <%= @proxy_cache_valid %>;
<% end -%>
proxy_pass <%= @proxy %>;
Expand Down

0 comments on commit 5c40510

Please sign in to comment.