HeaderRemovalSanitizer Class

Removes the specified headers from recorded entries.

public sealed class HeaderRemovalSanitizer : IHttpRecordingSanitizer

Remarks

This sanitizer only reaches headers. Secrets carried in the request URI or in a body are not affected: use UriQueryParameterSanitizer for query string parameters, or a custom IHttpRecordingSanitizer to rewrite HttpRecordingEntry.RequestBody and HttpRecordingEntry.ResponseBody.

Implements

Constructors

NameDescription
HeaderRemovalSanitizer(string[])

HeaderRemovalSanitizer(string[])

HeaderRemovalSanitizer.cs
public HeaderRemovalSanitizer(params string[] headerNames)

Parameters

headerNames string[]

No documentation is available.

Methods

NameDescription
Sanitize(HttpRecordingEntry)Sanitizes the entry in-place to redact sensitive data.

Sanitize(HttpRecordingEntry)

HeaderRemovalSanitizer.cs

Sanitizes the entry in-place to redact sensitive data.

public void Sanitize(HttpRecordingEntry entry)

Parameters

entry HttpRecordingEntry