HostingLogScope now logs RequestPath as Request.BasePath+Request.Path #8942 (#8944)

This commit is contained in:
penenkel 2019-04-02 21:33:15 +02:00 committed by Chris Ross
parent 42a2dd5b3e
commit b6bbc29498
1 changed files with 3 additions and 1 deletions

View File

@ -132,7 +132,9 @@ namespace Microsoft.AspNetCore.Hosting.Internal
public HostingLogScope(HttpContext httpContext, string correlationId)
{
_traceIdentifier = httpContext.TraceIdentifier;
_path = httpContext.Request.Path.ToString();
_path = (httpContext.Request.PathBase.HasValue
? httpContext.Request.PathBase + httpContext.Request.Path
: httpContext.Request.Path).ToString();
_correlationId = correlationId;
}