diff --git a/src/NetEvolve.Http.Correlation.AspNetCore/HttpCorrelationMiddleware.cs b/src/NetEvolve.Http.Correlation.AspNetCore/HttpCorrelationMiddleware.cs index 1510ebc..f6442e8 100644 --- a/src/NetEvolve.Http.Correlation.AspNetCore/HttpCorrelationMiddleware.cs +++ b/src/NetEvolve.Http.Correlation.AspNetCore/HttpCorrelationMiddleware.cs @@ -1,5 +1,6 @@ namespace NetEvolve.Http.Correlation; +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -54,7 +55,10 @@ public async Task InvokeAsync(HttpContext context) var accessor = context.RequestServices.GetService()!; accessor.HeaderName = usedHeaderName; - var scopeProperties = new Dictionary { { usedHeaderName, correlationId } }; + var scopeProperties = new Dictionary(StringComparer.Ordinal) + { + { usedHeaderName, correlationId } + }; using (_logger.BeginScope(scopeProperties)) {