]> git.kaiwu.me - haproxy.git/commit
MINOR: http-fetch: add {fs,bs}.hdng.{found,fixed} to report hardening results
authorWilly Tarreau <w@1wt.eu>
Tue, 10 Nov 2026 10:41:32 +0000 (11:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 12 Nov 2026 17:12:23 +0000 (18:12 +0100)
commit0671d23c7f44856261545f5d753a06ca794636c1
treebab2de2a1d54e04c0f8c152216057bf981555dea
parent1a2e46898276718cc018beceb6c0429bb63bd2c8
MINOR: http-fetch: add {fs,bs}.hdng.{found,fixed} to report hardening results

These new sample fetches return, for the frontend or backend mux stream,
the mask of HTTP hardening conditions that were met (found) and of the
rules that were enforced (fixed). They rely on the new mux stream controls
MUX_SCTL_GET_HDNG_FOUND and MUX_SCTL_GET_HDNG_FIXED, and fail when the mux
doesn't support them. The main purpose is to log them, e.g.:

    log-format "... cli_hdng=%[fs.hdng.found,htonl,hex] ..."

Note that a request rejected before the stream is created cannot be
reported this way since it is handled and logged by the mux alone.

The doc also mentions that the bit numbers are subject to change.
doc/configuration.txt
src/http_fetch.c