Você registra cabeçalhos conhecidos com capture request header
, mas o HAproxy 1.6 introduz uma nova diretiva, o % sintaxehttp-request capture
.
http-request capture <sample> [ len <length> | id <id> ]
:
captures sample expression<sample>
from the request buffer, and converts it to a string of at most<len>
characters. The resulting string is stored into the next request "capture" slot, so it will possibly appear next to some captured HTTP headers. It will then automatically appear in the logs, and it will be possible to extract it using sample fetch rules to feed it into headers or anything. The length should be limited given that this size will be allocated for each capture during the whole session life. Please check section 7.3 (Fetching samples) and "capture request header" for more information.
que eu acho que você pode configurar para usar expressões regex como <sample>