Skip to content

Commit 6e42fb2

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 6e42fb2

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-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

+1
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,7 @@
593593
it { is_expected.to contain_class('apache::mod::authz_groupfile') }
594594
it { is_expected.to contain_class('apache::mod::auth_gssapi') }
595595
it { is_expected.to contain_class('apache::mod::env') }
596+
it { is_expected.to contain_class('apache::mod::expires') }
596597
it { is_expected.to contain_class('apache::mod::filter') }
597598
it { is_expected.to contain_class('apache::mod::headers') }
598599
it { is_expected.to contain_class('apache::mod::mime') }

0 commit comments

Comments
 (0)