config: extend default headers list and raise max to 25

- CONFIG: Add Sec-CH-UA, Sec-CH-UA-Mobile, Sec-CH-UA-Platform,
  Sec-Fetch-Dest, Sec-Fetch-Mode, Sec-Fetch-Site, Accept,
  Accept-Language, Accept-Encoding to default JsonSockLogHeaders
- CONFIG: Raise DEFAULT_MAX_HEADERS from 10 to 25
- DOC: Update architecture.yml value_example and conf/mod_reqin_log.conf

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
toto
2026-03-05 15:14:28 +01:00
parent 643557a2e7
commit 98e413be68
4 changed files with 18 additions and 6 deletions

View File

@ -189,7 +189,10 @@ configuration:
- name: JsonSockLogHeaders - name: JsonSockLogHeaders
type: list type: list
context: server-config context: server-config
value_example: ["X-Request-Id", "X-Trace-Id", "User-Agent"] value_example: ["X-Request-Id", "X-Trace-Id", "User-Agent", "Referer",
"X-Forwarded-For", "Sec-CH-UA", "Sec-CH-UA-Mobile", "Sec-CH-UA-Platform",
"Sec-Fetch-Dest", "Sec-Fetch-Mode", "Sec-Fetch-Site",
"Accept", "Accept-Language", "Accept-Encoding"]
description: > description: >
List of HTTP header names to log. For each configured header <H>, List of HTTP header names to log. For each configured header <H>,
the module adds a JSON field 'header_<H>' at the root level of the the module adds a JSON field 'header_<H>' at the root level of the
@ -198,7 +201,7 @@ configuration:
- name: JsonSockLogMaxHeaders - name: JsonSockLogMaxHeaders
type: integer type: integer
context: server-config context: server-config
default: 10 default: 25
min: 0 min: 0
description: > description: >
Maximum number of headers from JsonSockLogHeaders to actually log. Maximum number of headers from JsonSockLogHeaders to actually log.

View File

@ -14,10 +14,13 @@ JsonSockLogSocket "/var/run/logcorrelator/http.socket"
# HTTP headers to include in the JSON log # HTTP headers to include in the JSON log
# Warning: Be careful not to log sensitive headers like Authorization, Cookie, etc. # Warning: Be careful not to log sensitive headers like Authorization, Cookie, etc.
JsonSockLogHeaders X-Request-Id X-Trace-Id User-Agent Referer X-Forwarded-For JsonSockLogHeaders X-Request-Id X-Trace-Id User-Agent Referer X-Forwarded-For \
Sec-CH-UA Sec-CH-UA-Mobile Sec-CH-UA-Platform \
Sec-Fetch-Dest Sec-Fetch-Mode Sec-Fetch-Site \
Accept Accept-Language Accept-Encoding
# Maximum number of headers to log (from the configured list) # Maximum number of headers to log (from the configured list)
JsonSockLogMaxHeaders 10 JsonSockLogMaxHeaders 25
# Maximum length of each header value (longer values are truncated) # Maximum length of each header value (longer values are truncated)
JsonSockLogMaxHeaderValueLen 256 JsonSockLogMaxHeaderValueLen 256

View File

@ -1,4 +1,4 @@
%global spec_version 1.0.16 %global spec_version 1.0.17
Name: mod_reqin_log Name: mod_reqin_log
Version: %{spec_version} Version: %{spec_version}
@ -37,6 +37,12 @@ install -m 644 %{_pkgroot}/%{_sysconfdir}/httpd/conf.d/mod_reqin_log.conf %{buil
%doc %{_docdir}/%{name} %doc %{_docdir}/%{name}
%changelog %changelog
* Thu Mar 05 2026 Developer <dev@example.com> - 1.0.17
- CONFIG: Extend default JsonSockLogHeaders list (User-Agent, Referer, X-Forwarded-For,
Sec-CH-UA*, Sec-Fetch-*, Accept, Accept-Language, Accept-Encoding)
- CONFIG: Raise DEFAULT_MAX_HEADERS from 10 to 25
- DOC: Update architecture.yml and conf/mod_reqin_log.conf accordingly
* Thu Mar 05 2026 Developer <dev@example.com> - 1.0.16 * Thu Mar 05 2026 Developer <dev@example.com> - 1.0.16
- FIX: Skip subrequests and internal redirects to log only the original client request - FIX: Skip subrequests and internal redirects to log only the original client request
- DOC: Document subrequest/redirect filtering in architecture.yml - DOC: Document subrequest/redirect filtering in architecture.yml

View File

@ -15,7 +15,7 @@
#define MOD_REQIN_LOG_NAME "mod_reqin_log" #define MOD_REQIN_LOG_NAME "mod_reqin_log"
/* Default configuration values */ /* Default configuration values */
#define DEFAULT_MAX_HEADERS 10 #define DEFAULT_MAX_HEADERS 25
#define DEFAULT_MAX_HEADER_VALUE_LEN 256 #define DEFAULT_MAX_HEADER_VALUE_LEN 256
#define DEFAULT_RECONNECT_INTERVAL 10 #define DEFAULT_RECONNECT_INTERVAL 10
#define DEFAULT_ERROR_REPORT_INTERVAL 10 #define DEFAULT_ERROR_REPORT_INTERVAL 10