diff --git a/src/Serilog.Enrichers.CorrelationId/Enrichers/CorrelationIdHeaderEnricher.cs b/src/Serilog.Enrichers.CorrelationId/Enrichers/CorrelationIdHeaderEnricher.cs index 4494549..091192b 100644 --- a/src/Serilog.Enrichers.CorrelationId/Enrichers/CorrelationIdHeaderEnricher.cs +++ b/src/Serilog.Enrichers.CorrelationId/Enrichers/CorrelationIdHeaderEnricher.cs @@ -48,6 +48,10 @@ private string GetCorrelationId() { header = values.FirstOrDefault(); } + else if (_contextAccessor.HttpContext.Response.Headers.TryGetValue(_headerKey, out values)) + { + header = values.FirstOrDefault(); + } var correlationId = string.IsNullOrEmpty(header) ? Guid.NewGuid().ToString()