mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-05 06:35:13 -04:00
Possible null reference fix.
This commit is contained in:
parent
21d2e9ff0c
commit
e113a50597
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
using System.Net.Mime;
|
using System.Net.Mime;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -66,7 +67,7 @@ namespace Jellyfin.Api.Controllers
|
|||||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
public ActionResult<SystemInfo> GetSystemInfo()
|
public ActionResult<SystemInfo> GetSystemInfo()
|
||||||
{
|
{
|
||||||
return _appHost.GetSystemInfo(Request.HttpContext.Connection.RemoteIpAddress);
|
return _appHost.GetSystemInfo(Request.HttpContext.Connection.RemoteIpAddress ?? IPAddress.Loopback);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -78,7 +79,7 @@ namespace Jellyfin.Api.Controllers
|
|||||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
public ActionResult<PublicSystemInfo> GetPublicSystemInfo()
|
public ActionResult<PublicSystemInfo> GetPublicSystemInfo()
|
||||||
{
|
{
|
||||||
return _appHost.GetPublicSystemInfo(Request.HttpContext.Connection.RemoteIpAddress);
|
return _appHost.GetPublicSystemInfo(Request.HttpContext.Connection.RemoteIpAddress ?? IPAddress.Loopback);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user