Skip to content

Commit d51909d

Browse files
committed
Automatically include mod_expires if required via vhost directories
Similar to other options passed in the vhost's directory this now inspects the directories entry and if expires_* is passed, mod_expires is included.
1 parent 6d218cf commit d51909d

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

manifests/vhost.pp

+4
Original file line numberDiff line numberDiff line change
@@ -2362,6 +2362,10 @@
23622362
if 'setenv' in $directory {
23632363
include apache::mod::env
23642364
}
2365+
2366+
if 'expires_active' in $directory or 'expires_default' in $directory or 'expires_by_type' in $directory {
2367+
include apache::mod::expires
2368+
}
23652369
}
23662370

23672371
# Template uses:

spec/defines/vhost_spec.rb

+5
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,10 @@
335335
}
336336
}
337337
},
338+
{
339+
'path' => '/expires',
340+
'expires_active' => true,
341+
},
338342
],
339343
'error_log' => false,
340344
'error_log_file' => 'httpd_error_log',
@@ -593,6 +597,7 @@
593597
it { is_expected.to contain_class('apache::mod::authz_groupfile') }
594598
it { is_expected.to contain_class('apache::mod::auth_gssapi') }
595599
it { is_expected.to contain_class('apache::mod::env') }
600+
it { is_expected.to contain_class('apache::mod::expires') }
596601
it { is_expected.to contain_class('apache::mod::filter') }
597602
it { is_expected.to contain_class('apache::mod::headers') }
598603
it { is_expected.to contain_class('apache::mod::mime') }

0 commit comments

Comments
 (0)