@@ -19,21 +19,21 @@ SecRequestBodyAccess On
19
19
# Enable XML request body parser.
20
20
# Initiate XML Processor in case of xml content-type
21
21
#
22
- SecRule REQUEST_HEADERS:Content-Type "(?:application(?:/soap\+|/)|text/)xml" \
22
+ SecRule REQUEST_HEADERS:Content-Type "^ (?:application(?:/soap\+|/)|text/)xml" \
23
23
"id:'200000',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=XML"
24
24
25
25
# Enable JSON request body parser.
26
26
# Initiate JSON Processor in case of JSON content-type; change accordingly
27
27
# if your application does not use 'application/json'
28
28
#
29
- SecRule REQUEST_HEADERS:Content-Type "application/json" \
29
+ SecRule REQUEST_HEADERS:Content-Type "^ application/json" \
30
30
"id:'200001',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=JSON"
31
31
32
32
# Sample rule to enable JSON request body parser for more subtypes.
33
33
# Uncomment or adapt this rule if you want to engage the JSON
34
34
# Processor for "+json" subtypes
35
35
#
36
- #SecRule REQUEST_HEADERS:Content-Type "^application/. +[+]json$ " \
36
+ #SecRule REQUEST_HEADERS:Content-Type "^application/[a-z0-9.-] +[+]json" \
37
37
# "id:'200006',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=JSON"
38
38
39
39
# Maximum request body size we will accept for buffering. If you support
0 commit comments