Blocking client IP in HAProxy

Well basically first you need to define the acl. There you will specify the ip address or the CIDR you want to block.

acl block_ip src 1.2.3.4 32.42.51.62 45.56.67.7/16

Then another acl in which you will define the URL you want to restrict.

acl my_path path_beg -i /abc/def

then just use both the acl to block the user on that particular path

block if block_ip my_path

here you can find more info on this.