]> git.kaiwu.me - haproxy.git/commit
MINOR: sample: add h2_enabled to report whether H2 may be used on frontends
authorWilly Tarreau <w@1wt.eu>
Mon, 12 Oct 2026 18:52:49 +0000 (18:52 +0000)
committerWilly Tarreau <w@1wt.eu>
Tue, 17 Nov 2026 10:08:46 +0000 (11:08 +0100)
commitd47985ccccadef2ce71b72a0c285c13c49be4d55
treec9d4e23f7f918e5f90197d1dedd5cedf71086ded
parentba31c1d5736ca4d5875cf1edf47a061b0707ffb5
MINOR: sample: add h2_enabled to report whether H2 may be used on frontends

With "tune.h2.fe.enabled" now able to disable HTTP/2 on frontends, users
may need to adapt some of their rules depending on whether or not HTTP/2
may be served to clients (filtering, headers, thresholds, redirects etc),
without having to keep them in sync by hand with the global setting.

This adds the "h2_enabled" sample fetch, which works like "quic_enabled":
it returns true only when HTTP/2 support was built in (USE_H2) and was not
disabled on frontends by "tune.h2.fe.enabled off".

This should be backported along with the "tune.h2.fe.enabled" setting.
doc/configuration.txt
src/sample.c