ModSecurity设置一个名为的变量 OUTBOUND_DATA_ERROR 至 1 每当响应大小高于配置的设置时 SecResponseBodyLimit 。因此,可以使用检查此变量的简单规则来实现该要求。 例:
OUTBOUND_DATA_ERROR
1
SecResponseBodyLimit
SecRule OUTBOUND_DATA_ERROR "@eq 1" "id:124,phase:4,t:none,log,msg:'DATA_OVERFLOW'"
ModSecurity文档参考