Skip to content

Commit

Permalink
analizators/s2259
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhorukovAnton committed Dec 29, 2021
1 parent 632783b commit 973f8a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common/ASC.Core.Common/BaseCommonLinkUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ public BaseCommonLinkUtility(
if (HttpContextAccessor?.HttpContext?.Request != null)
{
var u = HttpContextAccessor?.HttpContext.Request.GetUrlRewriter();

if (u == null) throw new ArgumentNullException("u");

uriBuilder = new UriBuilder(u.Scheme, LOCALHOST, u.Port);
}
_serverRoot = uriBuilder;
Expand Down Expand Up @@ -125,6 +128,9 @@ public string ServerRootPath
if (HttpContextAccessor?.HttpContext?.Request != null)
{
var u = HttpContextAccessor?.HttpContext?.Request.GetUrlRewriter();

if (u == null) throw new ArgumentNullException("u");

result = new UriBuilder(u.Scheme, u.Host, u.Port);

if (CoreBaseSettings.Standalone && !result.Uri.IsLoopback)
Expand Down

0 comments on commit 973f8a4

Please sign in to comment.