Adds check for basePath (#3668)
This commit is contained in:
Родитель
5d880f1e8b
Коммит
bf6d6a094e
|
@ -346,7 +346,7 @@ namespace Microsoft.Health.Fhir.Api.Features.Routing
|
|||
// NOTE: Append "/" to the end of the path base to workaround a known bug in UrlHelper.RouteUrl for endpoint routing.
|
||||
// Remove the workaround when we pick up the fix. (https://github.com/dotnet/aspnetcore/issues/53177)
|
||||
var pathBase = httpContext.Request?.PathBase.ToString();
|
||||
if (!string.IsNullOrEmpty(pathBase) && (string.IsNullOrEmpty(httpContext.Request?.Path) || string.Equals(httpContext.Request?.Path, "/", StringComparison.Ordinal)))
|
||||
if (!string.IsNullOrEmpty(pathBase) && !pathBase.EndsWith('/') && (string.IsNullOrEmpty(httpContext.Request?.Path) || string.Equals(httpContext.Request?.Path, "/", StringComparison.Ordinal)))
|
||||
{
|
||||
pathBase += "/";
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче