HAProxy community

Using Header Fetches in Concatenated String

Hi, I’m trying to bucket requests by type and user so that I can rate-limit based on concurrent connections. I think I’ve got this mostly figured out, but I’m hitting a snag and was hoping someone here could help me with the syntax.

Running HAProxy 2.0.14

I’ve tried multiple permutations of this, but hitting an error when validating the config:

http-request track-sc0 %[req.hdr('x-auth-token')]__%[var(txn.request_class)] if { hdr_beg(x-auth-token) -m found }

The error I’m getting is:

unknown fetch method '%[req.hdr'.

I’m sure I’m just not escaping the lookup properly, but any pointers that can be provided would be much appreciated.