]> git.kaiwu.me - njs.git/commit
Modules: extracted config-time merging into separate function.
authorDmitry Volyntsev <xeioex@nginx.com>
Sat, 6 Dec 2025 01:08:54 +0000 (17:08 -0800)
committerDmitry Volyntsev <xeioexception@gmail.com>
Mon, 12 Jan 2026 23:05:41 +0000 (15:05 -0800)
commitf23297f57d984e85413e8ff902a80f0682889bc1
tree763d4b1530681dcd8ad314b8b99ed863ed8c628d
parentaa0f3e501bffe8736fe1ada80d68a48b57432d00
Modules: extracted config-time merging into separate function.

This introduces ngx_js_merge_conftime_loc_conf() to handle merging
of configuration-time properties.

Normally ngx_js_merge_conf() does all the default value initialization
for child location configurations.

There is a special case for global "http" or "stream" configuration
where the parent configuration needs to be initialized (so it can be
reused by server configurations if no additional directives were
defined in them). But parent configurations are not initialized by
ngx_js_merge_conf().

Most of the ngx_js_loc_conf_t values are only used at runtime, so
only configuration-time values need to be merged in the parent.
The runtime values will be provided from the appropriate
ngx_js_loc_conf_t during request processing.

Previously, configuration-time merging was done inline. Extracting
it into a dedicated function simplifies adding new configuration-time
properties.
nginx/ngx_js.c