]> git.kaiwu.me - haproxy.git/commit
MINOR: http-conv: add hdng_rej_name to name the HTTP hardening reject rule
authorWilly Tarreau <w@1wt.eu>
Tue, 10 Nov 2026 10:54:56 +0000 (11:54 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 12 Nov 2026 17:12:23 +0000 (18:12 +0100)
commit906488861145950778e214caf8aefb7d31c8197e
tree2afb6eae9a8d66e74566437de459e64beb38bbeb
parent0671d23c7f44856261545f5d753a06ca794636c1
MINOR: http-conv: add hdng_rej_name to name the HTTP hardening reject rule

The hdng_rej_name converter takes a mask of HTTP_HRD_* flags such as returned
by fs.hdng.fixed or bs.hdng.fixed, keeps only the "reject" rules, and
returns the name of the lowest one, as found in http_hardening_kws[]. Since
a reject stops the processing, at most one is normally present. Other rules
are ignored, and the converter fails when no reject rule remains, so that
nothing is logged when nothing was rejected:

    log-format "... cli_hdng=%[fs.hdng.found,htonl,hex],%[fs.hdng.fixed,hdng_rej_name] ..."
doc/configuration.txt
src/http_conv.c