WAF rule lower() function returns error

Hi everyone,

I hope someone will be able to assist.
I’m trying to check the user-agent header field to make sure it does not contain specific

(any (http.request.headers[“user-agent”][*] in {“facebook” “charlie” “brown”}))
As the verification is case sensitive I want to use the lower function on the http.request.headers
and have tried the following options which all return an error:

(any (lower(http.request.headers)[“user-agent”][*] in {“facebook” “charlie” “brown”}))

returns an error:

(any (lower(http.request.headers)[“user-agent”][*] in {“facebook” “charlie” “brown”})) ^^^^^^^^^^^^^^^^^^^^ invalid type of argument #0: expected value of type {Type(Bytes)}, but got Map(Array(Bytes))

(any (lower(http.request.headers[“user-agent”][*]) in {“facebook” “charlie” “brown”}))

returns an error:

(any (lower(http.request.headers[“user-agent”][*]) in {“facebook” “charlie” “brown”})) ^^ cannot perform this operation on type Array(CompoundType { layers: 0, len: 0, primitive: Bytes })