From c3f627af420c897d193d2c8d25fcbee5c81bd682 Mon Sep 17 00:00:00 2001 From: Florian Fittschen Date: Fri, 25 Sep 2026 17:16:47 +0200 Subject: [PATCH] fix(network-logger): match sensitive headers case-insensitively processPatterns() builds the sensitiveHeaders regexes with process(_:options: [.caseInsensitive]), but process(_:options:) never passed the options on to Regex, so header names were matched case-sensitively. A configuration with "authorization" didn't redact "Authorization", which is how URLRequest spells the header. --- Sources/Pulse/NetworkLogger/NetworkLogger.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Pulse/NetworkLogger/NetworkLogger.swift b/Sources/Pulse/NetworkLogger/NetworkLogger.swift index e772a949f..d2b30f280 100644 --- a/Sources/Pulse/NetworkLogger/NetworkLogger.swift +++ b/Sources/Pulse/NetworkLogger/NetworkLogger.swift @@ -136,7 +136,7 @@ public final class NetworkLogger: @unchecked Sendable { func process(_ pattern: String, options: [Regex.Options]) -> Regex? { do { let pattern = configuration.isRegexEnabled ? pattern : expandingWildcards(pattern) - return try Regex(pattern) + return try Regex(pattern, Regex.Options(options)) } catch { debugPrint("Failed to parse pattern: \(pattern) \(error)") return nil