Skip to content

Commit

Permalink
Allow configuring SecResponseBodyAccess
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincevrp committed Jul 30, 2022
1 parent 23a4115 commit 4c7fc1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions manifests/mod/security.pp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@
# @param secrequestbodyaccess
# Toggle SecRequestBodyAccess On or Off
#
# @param secresponsebodyaccess
# Toggle SecResponseBodyAccess On or Off
#
# @param manage_security_crs
# Toggles whether to manage ModSecurity Core Rule Set
#
Expand Down Expand Up @@ -127,6 +130,7 @@
Integer $secrequestbodynofileslimit = 131072,
Integer $secrequestbodyinmemorylimit = 131072,
Enum['On', 'Off'] $secrequestbodyaccess = 'On',
Enum['On', 'Off'] $secresponsebodyaccess = 'Off',
Boolean $manage_security_crs = true,
) inherits apache::params {
include apache
Expand Down
2 changes: 1 addition & 1 deletion templates/mod/security.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
SecRule TX:/^MSC_/ "!@streq 0" \
"id:'200004',phase:2,t:none,deny,msg:'ModSecurity internal error flagged: %{MATCHED_VAR_NAME}'"

SecResponseBodyAccess Off
SecResponseBodyAccess <%= @secresponsebodyaccess %>
SecResponseBodyMimeType text/plain text/html text/xml
SecResponseBodyLimit 524288
SecResponseBodyLimitAction ProcessPartial
Expand Down

0 comments on commit 4c7fc1c

Please sign in to comment.