BaseCommonLinkUtility optimization
This commit is contained in:
parent
e13049c21f
commit
0e10323e30
@ -90,10 +90,12 @@ namespace ASC.Core.Common
|
|||||||
public CoreBaseSettings CoreBaseSettings { get; }
|
public CoreBaseSettings CoreBaseSettings { get; }
|
||||||
public TenantManager TenantManager { get; }
|
public TenantManager TenantManager { get; }
|
||||||
|
|
||||||
|
private string serverRootPath;
|
||||||
public string ServerRootPath
|
public string ServerRootPath
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
if (!string.IsNullOrEmpty(serverRootPath)) return serverRootPath;
|
||||||
UriBuilder result;
|
UriBuilder result;
|
||||||
// first, take from current request
|
// first, take from current request
|
||||||
if (HttpContext?.Request != null)
|
if (HttpContext?.Request != null)
|
||||||
@ -137,7 +139,7 @@ namespace ASC.Core.Common
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result.Uri.ToString().TrimEnd('/');
|
return serverRootPath = result.Uri.ToString().TrimEnd('/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user