]> git.kaiwu.me - haproxy.git/commit
MINOR: http/hardening: add "delete-unregistered-header-fields"
authorWilly Tarreau <w@1wt.eu>
Tue, 27 Oct 2026 15:29:23 +0000 (16:29 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2026 21:45:32 +0000 (22:45 +0100)
commit4b9b6044b228bac825f18fd9b54bd906c06b932e
tree876bb6d4f845de387a801b3e3c6f63f43f9d110f
parent366a30920b96c0fb5bac036225e9254a3909f395
MINOR: http/hardening: add "delete-unregistered-header-fields"

Deletes from requests and responses any header field whose name starts
with 'x-' (upper or lower case). These header fields are not registered
with IANA and are not used across the internet by standard components.
They may appear in untrusted requests in attacks trying to exploit some
backend framework weaknesses however, as well as in old browsers that
were trying to work around known server bugs (e.G. "X-Pad"). While it
would be risky to block such requests, it is safe and even recommended
to delete such headers from inbound internet requests. It is preferable
not to do it on responses however when applications uses such header
fields to report information to HAProxy.
doc/configuration.txt
include/haproxy/http-t.h
src/h1.c
src/h2.c
src/h3.c
src/http.c