Haproxy 1.8 to Haproxy 2.2 Configuration error

Hello All,
We’re doing a Haproxy upgrade from v1.8 to 2.2. Facing issue on below rule.

reqadd X-Forwarded-Proto:\ http (This is not supporting on Haproxy22)

Tested in haproxy 22 with below rule as above one is deprecated.
http-request add-header X-Forwarded-Proto:\ http

But Getting below error for the same.
“while parsing ‘http-request add-header’ rule : expects exactly 2 arguments.”
can someone please help here to convert the rule in the right way.

You need to remove the colon and backslash so that it looks like this

http-request add-header X-Forwarded-Proto http

the add-header’s first argument is the header name and second one is the header value