Skip to content

Commit

Permalink
MODULES-1294 Fix issue with auth_require not taking precedence over d…
Browse files Browse the repository at this point in the history
…efault of require all granted, added checks for require and auth_require before adding the default
  • Loading branch information
Travis Fields committed Sep 16, 2014
1 parent 7a98903 commit 0d39322
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions templates/vhost/_directories.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@
<%- if @apache_version == '2.4' -%>
<%- if directory['require'] and directory['require'] != '' -%>
Require <%= Array(directory['require']).join(' ') %>
<%- else -%>
<%- end -%>
<%- if directory['auth_require'] -%>
Require <%= directory['auth_require'] %>
<%- end -%>
<%- if !(directory['require'] and directory['require'] != '') && !(directory['auth_require']) -%>
Require all granted
<%- end -%>
<%- else -%>
Expand Down Expand Up @@ -127,9 +131,6 @@
<%- if directory['auth_group_file'] -%>
AuthGroupFile <%= directory['auth_group_file'] %>
<%- end -%>
<%- if directory['auth_require'] -%>
Require <%= directory['auth_require'] %>
<%- end -%>
<%- if directory['fallbackresource'] -%>
FallbackResource <%= directory['fallbackresource'] %>
<%- end -%>
Expand Down

0 comments on commit 0d39322

Please sign in to comment.