Skip to content

Commit

Permalink
Update Sources/Hummingbird/Middleware/LogRequestMiddleware.swift
Browse files Browse the repository at this point in the history
Co-authored-by: Joannis Orlandos <joannis@orlandos.nl>
  • Loading branch information
adam-fowler and Joannis authored May 6, 2024
1 parent 843b655 commit 8ae94a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Hummingbird/Middleware/LogRequestMiddleware.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public struct LogRequestsMiddleware<Context: BaseRequestContext>: RouterMiddlewa
func allHeaders(headers: HTTPFields, except: [HTTPField.Name]) -> [String: String] {
let headers = headers
.compactMap { entry -> (key: String, value: String)? in
guard except.first(where: { entry.name == $0 }) == nil else { return nil }
if except.contains(where: { entry.name == $0 }) { return nil }
if self.redactHeaders.contains(entry.name) {
return (key: entry.name.canonicalName, value: "***")
} else {
Expand Down

0 comments on commit 8ae94a2

Please sign in to comment.