]> git.kaiwu.me - haproxy.git/commit
MINOR: filters: Add a global option to enforce the legacy filter api
authorChristopher Faulet <cf@haproxy.x>
Thu, 8 Oct 2026 13:38:46 +0000 (15:38 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 9 Oct 2026 14:17:36 +0000 (16:17 +0200)
commit9324cd8d917e004ef2e6d3618188f6bf37010039
tree0702b505a5fa71d210a30b8c0920cd087266246c
parent91d772de3f59e7298c3f2c1d8fd90fc5cd697e01
MINOR: filters: Add a global option to enforce the legacy filter api

A proxy without explicit filter declaration uses the new filter mode by
default. It is an issue for the obsolete filters relying on an implicit
declaration only and not supporting the new mode: the implicit declarations
of such filters are not visible for the new mode, they are silently
ignored. All the filters supported in-tree are available in both modes, but
it is not necessarily the case of the third-party filters, and there was no
way for the user to restore the prior behavior in this case.

Add the "filter-api" global option for this: when it is set to
"downgrade-to-legacy", the legacy filter mode is enforced on the proxies
without explicit filter declaration, "filter" or "filter-*" directives. The
proxies with explicit declarations keep the mode they selected, so both
modes can be used simultaneously, on different proxies.

The option is unset by default. It can be set to "default" to restore the
default mode.
reg-tests/filters/legacy-mode.vtc [new file with mode: 0644]
src/filters.c