public AspNetCoreCorrelationIdProvider( IHttpContextAccessor httpContextAccessor, IOptions <AbpCorrelationIdOptions> options) { HttpContextAccessor = httpContextAccessor; Options = options.Value; }
protected virtual void CheckAndSetCorrelationIdOnResponse( HttpContext httpContext, AbpCorrelationIdOptions options, string correlationId) { if (httpContext.Response.HasStarted) { return; } if (!options.SetResponseHeader) { return; } if (httpContext.Response.Headers.ContainsKey(options.HttpHeaderName)) { return; } httpContext.Response.Headers[options.HttpHeaderName] = correlationId; }
public AbpCorrelationIdMiddleware(IOptions <AbpCorrelationIdOptions> options, ICorrelationIdProvider correlationIdProvider) { _options = options.Value; _correlationIdProvider = correlationIdProvider; }