Skip to content

Commit

Permalink
fix: handle undefined value of $cache_ignore_headers in deprecated mo…
Browse files Browse the repository at this point in the history
…dule and remove module from bsd defaults
  • Loading branch information
ThomasMinor committed Feb 1, 2024
1 parent f23e382 commit 681463f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 0 additions & 2 deletions manifests/default_mods.pp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@
'FreeBSD': {
include apache::mod::actions
include apache::mod::authn_core
include apache::mod::cache
include apache::mod::disk_cache
include apache::mod::filter
include apache::mod::headers
include apache::mod::info
Expand Down
9 changes: 7 additions & 2 deletions manifests/mod/disk_cache.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @summary
# Installs and configures `mod_disk_cache`.
#
#
# @param cache_root
# Defines the name of the directory on the disk to contain cache files.
# Default depends on the Apache version and operating system:
Expand Down Expand Up @@ -28,10 +28,15 @@
) {
deprecation('apache::mod::disk_cache', 'This class is deprecated; please use apache::mod::cache_disk')

$_cache_ignore_headers = $cache_ignore_headers ? {
undef => [],
default => $cache_ignore_headers.split(' ')
}

class { 'apache::mod::cache_disk':
cache_root => $cache_root,
cache_enable => ['/'],
cache_ignore_headers => $cache_ignore_headers.split(' '),
cache_ignore_headers => $_cache_ignore_headers,
cache_dir_length => 1,
cache_dir_levels => 2,
configuration_file_name => 'cache_disk.conf'
Expand Down

0 comments on commit 681463f

Please sign in to comment.