-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Use privacy mask when logging Authorization header (#29)
Co-authored-by: danthorpe <[email protected]>
- Loading branch information
Showing
2 changed files
with
66 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import HTTPTypes | ||
import os.log | ||
|
||
extension HTTPField.Name { | ||
static let requiresPrivateLogging: Set<Self> = Self.requireHashPrivateLogging | ||
static let requireHashPrivateLogging: Set<Self> = [.authorization] | ||
public var requiresPrivateLogging: Bool { | ||
Self.requiresPrivateLogging.contains(self) | ||
} | ||
public var requireHashPrivateLogging: Bool { | ||
Self.requireHashPrivateLogging.contains(self) | ||
} | ||
} |