]> git.kaiwu.me - nginx.git/commit
Headers filter: inheritance control for add_header and add_trailer.
authorRoman Arutyunyan <arut@nginx.com>
Mon, 14 Jul 2025 17:44:05 +0000 (21:44 +0400)
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>
Sat, 25 Oct 2025 15:46:20 +0000 (19:46 +0400)
commitc93a0c48af87bbae1568eaf110e207e435bbe0bd
treec4b78ef03b856e3eb3f3e55b255a3d0bc62e5ea4
parentac72ca60c773a9ab6f3c6344ac1f2c03ca2b3201
Headers filter: inheritance control for add_header and add_trailer.

The new directives add_header_inherit and add_trailer_inherit allow
to alter inheritance rules for the values specified in the add_header
and add_trailer directives in a convenient way.

The "merge" parameter enables appending the values from the previous level
to the current level values.

The "off" parameter cancels inheritance of the values from the previous
configuration level, similar to add_header "" (2194e75bb).

The "on" parameter (default) enables the standard inheritance behaviour,
which is to inherit values from the previous level only if there are no
directives on the current level.

The inheritance rules themselves are inherited in a standard way.  Thus,
for example, "add_header_inherit merge;" specified at the top level will
be inherited in all nested levels recursively unless redefined below.
src/http/modules/ngx_http_headers_filter_module.c