From 874ddcac2a058772a67056076bf23aa7b60cead9 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Wed, 14 May 2014 14:33:58 -0700 Subject: [PATCH 1/2] add location_allow/deny directives --- templates/vhost/vhost_location_stub_status.erb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/templates/vhost/vhost_location_stub_status.erb b/templates/vhost/vhost_location_stub_status.erb index 0405b0317..592c981c0 100644 --- a/templates/vhost/vhost_location_stub_status.erb +++ b/templates/vhost/vhost_location_stub_status.erb @@ -1,4 +1,10 @@ location <%= @location %> { +<% if @location_allow -%><% @location_allow.each do |allow_rule| -%> + allow <%= allow_rule %>; +<% end -%><% end -%> +<% if @location_deny -%><% @location_deny.each do |deny_rule| -%> + deny <%= deny_rule %>; +<% end -%><% end -%> <% if @location_custom_cfg_prepend -%><% @location_custom_cfg_prepend.each do |key,value| -%> <% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> <% Array(subvalue).each do |asubvalue| -%> From 31f2cce35e1ef978ed73cc6ce465e5853420281a Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Wed, 14 May 2014 14:34:28 -0700 Subject: [PATCH 2/2] add location_allow/deny directives --- templates/vhost/vhost_location_alias.erb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/templates/vhost/vhost_location_alias.erb b/templates/vhost/vhost_location_alias.erb index eb1e7dc86..dbe230db2 100644 --- a/templates/vhost/vhost_location_alias.erb +++ b/templates/vhost/vhost_location_alias.erb @@ -1,4 +1,10 @@ location <%= @location %> { +<% if @location_allow -%><% @location_allow.each do |allow_rule| -%> + allow <%= allow_rule %>; +<% end -%><% end -%> +<% if @location_deny -%><% @location_deny.each do |deny_rule| -%> + deny <%= deny_rule %>; +<% end -%><% end -%> <% if @location_custom_cfg_prepend -%><% @location_custom_cfg_prepend.each do |key,value| -%> <% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> <% Array(subvalue).each do |asubvalue| -%>