17 references to RequestHeaderPrefix
Microsoft.AspNetCore.Diagnostics.Middleware (3)
Logging\HttpLoggingRedactionInterceptor.cs (1)
58
_requestHeadersReader = new(optionsValue.RequestHeadersDataClasses, redactorProvider, HttpLoggingTagNames.
RequestHeaderPrefix
);
Logging\HttpLoggingTagNames.cs (1)
70
RequestHeaderPrefix
,
Logging\RequestHeadersLogEnricher.cs (1)
39
_normalizedHeaders = HeaderNormalizer.PrepareNormalizedHeaderNames(_headersDataClasses, HttpLoggingTagNames.
RequestHeaderPrefix
);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (14)
Logging\AcceptanceTests.cs (9)
187
Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.
RequestHeaderPrefix
));
247
Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.
RequestHeaderPrefix
));
320
Assert.Single(requestState, x => x.Key == HttpLoggingTagNames.
RequestHeaderPrefix
+ NormalizedRequestHeader);
375
Assert.Single(state, x => x.Key == HttpLoggingTagNames.
RequestHeaderPrefix
+ NormalizedRequestHeader);
388
x.Key.StartsWith(HttpLoggingTagNames.
RequestHeaderPrefix
) && !x.Key.EndsWith(NormalizedRequestHeader));
426
Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.
RequestHeaderPrefix
));
580
Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.
RequestHeaderPrefix
));
621
Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.
RequestHeaderPrefix
));
655
Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.
RequestHeaderPrefix
));
Logging\RequestHeadersEnricherTests.cs (5)
26
private const string NormalizedHeaderKey1 = HttpLoggingTagNames.
RequestHeaderPrefix
+ "x-requestid";
27
private const string NormalizedHeaderKey2 = HttpLoggingTagNames.
RequestHeaderPrefix
+ "host";
28
private const string NormalizedHeaderKey3 = HttpLoggingTagNames.
RequestHeaderPrefix
+ "nullheader";
29
private const string NormalizedHeaderKey4 = HttpLoggingTagNames.
RequestHeaderPrefix
+ "x-platform";
188
Assert.False(enrichedState.ContainsKey(HttpLoggingTagNames.
RequestHeaderPrefix
+ headerKey2));