Skip to content

Commit 9aecf77

Browse files
committed
Allow configuring SecResponseBodyAccess
1 parent a4340db commit 9aecf77

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

manifests/mod/security.pp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@
9898
# @param secrequestbodyaccess
9999
# Toggle SecRequestBodyAccess On or Off
100100
#
101+
# @param secresponsebodyaccess
102+
# Toggle SecResponseBodyAccess On or Off
103+
#
101104
# @param manage_security_crs
102105
# Toggles whether to manage ModSecurity Core Rule Set
103106
#
@@ -136,6 +139,7 @@
136139
Integer[1,4] $paranoia_level = 1,
137140
Integer[1,4] $executing_paranoia_level = $paranoia_level,
138141
Enum['On', 'Off'] $secrequestbodyaccess = 'On',
142+
Enum['On', 'Off'] $secresponsebodyaccess = 'Off',
139143
Boolean $manage_security_crs = true,
140144
) inherits apache::params {
141145
include apache
@@ -202,6 +206,7 @@
202206
# - secrequestbodynofileslimit
203207
# - secrequestbodyinmemorylimit
204208
# - secrequestbodyaccess
209+
# - secresponsebodyaccess
205210
file { 'security.conf':
206211
ensure => file,
207212
content => template('apache/mod/security.conf.erb'),

templates/mod/security.conf.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
SecRule TX:/^MSC_/ "!@streq 0" \
4141
"id:'200004',phase:2,t:none,deny,msg:'ModSecurity internal error flagged: %{MATCHED_VAR_NAME}'"
4242

43-
SecResponseBodyAccess Off
43+
SecResponseBodyAccess <%= @secresponsebodyaccess %>
4444
SecResponseBodyMimeType text/plain text/html text/xml
4545
SecResponseBodyLimit 524288
4646
SecResponseBodyLimitAction ProcessPartial

0 commit comments

Comments
 (0)