Skip to content

Commit d906070

Browse files
committed
add option IndexHeadInsert for directory
1 parent c26ca5d commit d906070

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Diff for: spec/defines/vhost_spec.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@
149149
'directoryindex' => 'disabled',
150150
'options' => ['Indexes', 'FollowSymLinks', 'MultiViews'],
151151
'index_options' => ['FancyIndexing'],
152-
'index_style_sheet' => '/styles/style.css' },
152+
'index_style_sheet' => '/styles/style.css',
153+
'index_head_insert' => ['<base target=_blank>'] },
153154
{ 'path' => '/var/www/files/output_filtered',
154155
'set_output_filter' => 'output_filter' },
155156
{ 'path' => '/var/www/files/input_filtered',
@@ -648,6 +649,7 @@
648649
.with_content(%r{^\s+Options\sIndexes\sFollowSymLinks\sMultiViews$})
649650
.with_content(%r{^\s+IndexOptions\sFancyIndexing$})
650651
.with_content(%r{^\s+IndexStyleSheet\s'/styles/style\.css'$})
652+
.with_content(%r{^\s+IndexHeadInsert\s'<base target=_blank>'$})
651653
.with_content(%r{^\s+DirectoryIndex\sdisabled$})
652654
.with_content(%r{^\s+SetOutputFilter\soutput_filter$})
653655
.with_content(%r{^\s+SetInputFilter\sinput_filter$})

Diff for: templates/vhost/_directories.erb

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
<%- end -%>
4040
<%- if directory['index_style_sheet'] -%>
4141
IndexStyleSheet '<%= directory['index_style_sheet'] %>'
42+
<%- end -%>
43+
<%- if directory['index_head_insert'] -%>
44+
IndexHeadInsert '<%= Array(directory['index_head_insert']).join(' ') %>'
4245
<%- end -%>
4346
<%- if directory['allow_override'] -%>
4447
AllowOverride <%= Array(directory['allow_override']).join(' ') %>

0 commit comments

Comments
 (0)