3

recently we migrate our http load balancers from apache to haproxy (http mode) for security reasons we use LimitRequestBody in apache configurations to control requests size

is there any equivalent configurations for haproxy?

thanks in advanced

1 Answers1

2

I have not particularly used this, but you can use an ACL to match a request header's content-length that goes over your defined limit and deny it. Like so:

frontend fe
  bind x.x.x.x:xx
  ...
  acl overallowedsize hdr_val(content-length) ge 1024
  http-request deny if overallowedsize

Ref: http://www.haproxy.org/download/1.5/doc/configuration.txt