@@ -19,21 +19,21 @@ SecRequestBodyAccess On
1919# Enable XML request body parser.
2020# Initiate XML Processor in case of xml content-type
2121#
22- SecRule REQUEST_HEADERS:Content-Type "(?:application(?:/soap\+|/)|text/)xml" \
22+ SecRule REQUEST_HEADERS:Content-Type "^ (?:application(?:/soap\+|/)|text/)xml" \
2323 "id:'200000',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=XML"
2424
2525# Enable JSON request body parser.
2626# Initiate JSON Processor in case of JSON content-type; change accordingly
2727# if your application does not use 'application/json'
2828#
29- SecRule REQUEST_HEADERS:Content-Type "application/json" \
29+ SecRule REQUEST_HEADERS:Content-Type "^ application/json" \
3030 "id:'200001',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=JSON"
3131
3232# Sample rule to enable JSON request body parser for more subtypes.
3333# Uncomment or adapt this rule if you want to engage the JSON
3434# Processor for "+json" subtypes
3535#
36- #SecRule REQUEST_HEADERS:Content-Type "^application/. +[+]json$ " \
36+ #SecRule REQUEST_HEADERS:Content-Type "^application/[a-z0-9.-] +[+]json" \
3737# "id:'200006',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=JSON"
3838
3939# Maximum request body size we will accept for buffering. If you support
0 commit comments