public static string GetParentBaseUrl(this IRequest request) { var rawUrl = request.RawUrl; var endpointsPath = rawUrl.Substring(0, rawUrl.LastIndexOf('/') + 1); return new Uri(request.AbsoluteUri).GetLeftAuthority() + endpointsPath; }