From 98e413be68bbea19e05d61c91b48ed17394a94ff Mon Sep 17 00:00:00 2001 From: toto Date: Thu, 5 Mar 2026 15:14:28 +0100 Subject: [PATCH] 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> --- architecture.yml | 7 +++++-- conf/mod_reqin_log.conf | 7 +++++-- mod_reqin_log.spec | 8 +++++++- src/mod_reqin_log.h | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/architecture.yml b/architecture.yml index a3ba52e..daa2690 100644 --- a/architecture.yml +++ b/architecture.yml @@ -189,7 +189,10 @@ configuration: - name: JsonSockLogHeaders type: list 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: > List of HTTP header names to log. For each configured header , the module adds a JSON field 'header_' at the root level of the @@ -198,7 +201,7 @@ configuration: - name: JsonSockLogMaxHeaders type: integer context: server-config - default: 10 + default: 25 min: 0 description: > Maximum number of headers from JsonSockLogHeaders to actually log. diff --git a/conf/mod_reqin_log.conf b/conf/mod_reqin_log.conf index 1721976..53edca2 100644 --- a/conf/mod_reqin_log.conf +++ b/conf/mod_reqin_log.conf @@ -14,10 +14,13 @@ JsonSockLogSocket "/var/run/logcorrelator/http.socket" # HTTP headers to include in the JSON log # 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) -JsonSockLogMaxHeaders 10 +JsonSockLogMaxHeaders 25 # Maximum length of each header value (longer values are truncated) JsonSockLogMaxHeaderValueLen 256 diff --git a/mod_reqin_log.spec b/mod_reqin_log.spec index fdcc09f..fea4fd5 100644 --- a/mod_reqin_log.spec +++ b/mod_reqin_log.spec @@ -1,4 +1,4 @@ -%global spec_version 1.0.16 +%global spec_version 1.0.17 Name: mod_reqin_log Version: %{spec_version} @@ -37,6 +37,12 @@ install -m 644 %{_pkgroot}/%{_sysconfdir}/httpd/conf.d/mod_reqin_log.conf %{buil %doc %{_docdir}/%{name} %changelog +* Thu Mar 05 2026 Developer - 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 - 1.0.16 - FIX: Skip subrequests and internal redirects to log only the original client request - DOC: Document subrequest/redirect filtering in architecture.yml diff --git a/src/mod_reqin_log.h b/src/mod_reqin_log.h index 366ba7e..c281b72 100644 --- a/src/mod_reqin_log.h +++ b/src/mod_reqin_log.h @@ -15,7 +15,7 @@ #define MOD_REQIN_LOG_NAME "mod_reqin_log" /* Default configuration values */ -#define DEFAULT_MAX_HEADERS 10 +#define DEFAULT_MAX_HEADERS 25 #define DEFAULT_MAX_HEADER_VALUE_LEN 256 #define DEFAULT_RECONNECT_INTERVAL 10 #define DEFAULT_ERROR_REPORT_INTERVAL 10