I need to take a look at all the headers of certain requests. I've been reading the haproxy manual, I am able to use capture to log whatever header I KNOW is there.
But I would like to see ALL the headers, unknown to me, that the app receives. Is this possible with haproxy's logging options? Some sort of regexp or iteration method?
I am using haproxy 1.6
Thank you.
Try to use (in /etc/haproxy/haproxy.cfg):
req.hdrs
- Returns the current request headers as string including the last empty line separating headers from the request body%hr
- print captured request headersHope this helps.
You log known headers with
capture request header
directive but HAproxy 1.6 introduces a new directive, thehttp-request capture
syntax.which I think you can configure to use regex expressions as
<sample>