Appearance
GetRedactedHeaders Method
Definition
- Namespace:
JASE.Network - Assembly:
JASE.Network.dll
ReadOnlyDictionary<string, List<string>> GetRedactedHeaders(string redactValue = null, IEnumerable<string> additionalSensitiveHeaders = null)
csharp
ReadOnlyDictionary<string, List<string>> GetRedactedHeaders(string redactValue = null, IEnumerable<string> additionalSensitiveHeaders = null)Returns a redacted copy of RequestHeaders suitable for logging and exception messages. Sensitive headers (for example Authorization, Cookie, token, secret, apikey) are replaced with a constant value.
Parameters
| Name | Description |
|---|---|
additionalSensitiveHeaders | Optional collection of additional header names to redact (case-insensitive). Useful for custom headers such as "x-custom-secret" or vendor-specific API key headers. |
redactValue | Value used to replace redacted header values. If null/empty/whitespace, defaults to "REDACTED". |
Returns
A read-only dictionary containing a redacted copy of the request headers, or if RequestHeaders is .