Skip to content

Commit

Permalink
Add autoindex to ssl_header too (#1275)
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Becker authored and ekohl committed Dec 15, 2018
1 parent 4b06d59 commit 3f1893e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions spec/defines/resource_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,12 @@
attr: 'index_files',
value: [],
notmatch: %r{\s+index\s+}
},
{
title: 'should set autoindex',
attr: 'autoindex',
value: 'on',
match: ' autoindex on;'
}
].each do |param|
context "when #{param[:attr]} is #{param[:value]}" do
Expand Down
4 changes: 3 additions & 1 deletion templates/server/server_ssl_header.erb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ server {
<% end -%>
<% if @index_files and @index_files.count > 0 -%>
index <% Array(@index_files).each do |i| %> <%= i %><% end %>;

<% end -%>
<% if defined? @autoindex -%>
autoindex <%= @autoindex %>;
<% end -%>
<% if @absolute_redirect -%>
absolute_redirect <%= @absolute_redirect %>;
Expand Down

0 comments on commit 3f1893e

Please sign in to comment.