maliming
3 years ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
2 additions and
8 deletions
-
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Tracing/AbpCorrelationIdMiddleware.cs
|
|
|
@ -41,14 +41,8 @@ public class AbpCorrelationIdMiddleware : IMiddleware, ITransientDependency |
|
|
|
string correlationId = context.Request.Headers[_options.HttpHeaderName]; |
|
|
|
if (correlationId.IsNullOrEmpty()) |
|
|
|
{ |
|
|
|
lock (context.Request.Headers) |
|
|
|
{ |
|
|
|
if (correlationId.IsNullOrEmpty()) |
|
|
|
{ |
|
|
|
correlationId = Guid.NewGuid().ToString("N"); |
|
|
|
context.Request.Headers[_options.HttpHeaderName] = correlationId; |
|
|
|
} |
|
|
|
} |
|
|
|
correlationId = Guid.NewGuid().ToString("N"); |
|
|
|
context.Request.Headers[_options.HttpHeaderName] = correlationId; |
|
|
|
} |
|
|
|
|
|
|
|
return correlationId; |
|
|
|
|