I want to create an exclusion to disable specific rule (ID:920180) in my system. how should i write the syntax in REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf
Here my exclusion but I'm not sure fully covered to disable it:
SecRule REQUEST_HEADERS:Transfer-Encoding "@eq 0" "id:91001,phase:1,msg:'POST without Content-Length or Transfer-Encoding headers',pass,nolog,noauditlog,ctl:ruleRemovebyID=920180"
The error which I want to apply exclusion to this:
ModSecurity: Warning. Matched "Operator `Eq' with parameter `0' against variable `REQUEST_HEADERS:Transfer-Encoding' (Value: `0' ) [file "/etc/nginx/modsecurity/coreruleset/rules/REQUEST-920-PROTOCOL-ENFORCEMENT.conf"] [line "222"] [id "920180"] [rev ""] [msg "POST without Content-Length or Transfer-Encoding headers"] [data "HTTP/1.1"] [severity "4"] [ver "OWASP_CRS/3.3.0"] [maturity "0"] [accuracy "0"] [hostname "127.00.00.00"] [uri "/sample/api"] [unique_id "3562345"] [ref "v7,4"]
This is the actual rule from documentation ID: 920180 . https://github.com/SpiderLabs/owasp-modsecurity-crs/blob/v3.0/master/rules/REQUEST-920-PROTOCOL-ENFORCEMENT.conf#L280