diff options
| author | Fredrik Lindberg <fli@shapeshifter.se> | 2021-08-31 22:22:55 +0200 |
|---|---|---|
| committer | Fredrik Lindberg <fli@shapeshifter.se> | 2021-09-14 21:38:11 +0200 |
| commit | 90174f68e2b477e613d756d78cbfd89c2a33f30a (patch) | |
| tree | 41e859cb6d649de2942c5997036fe831a0692f56 /Jellyfin.Api/Controllers/SystemController.cs | |
| parent | e15fea5dade9478d9667399eb0c245917d3e1513 (diff) | |
Dynamically populate LocalAddress based on HTTP request
Support populating the LocalAddress field in the system info
endpoint based on the x-forwarded-host and x-forwarded-proto header.
The x-forwarded-host header must contain both the host and port for
the url to be properly constructed.
Behind network configuration option that is disabled by default.
Diffstat (limited to 'Jellyfin.Api/Controllers/SystemController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/SystemController.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Api/Controllers/SystemController.cs b/Jellyfin.Api/Controllers/SystemController.cs index bbbe5fb8d..ff81cc53b 100644 --- a/Jellyfin.Api/Controllers/SystemController.cs +++ b/Jellyfin.Api/Controllers/SystemController.cs @@ -66,7 +66,7 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status200OK)] public ActionResult<SystemInfo> GetSystemInfo() { - return _appHost.GetSystemInfo(Request.HttpContext.Connection.RemoteIpAddress ?? IPAddress.Loopback); + return _appHost.GetSystemInfo(Request); } /// <summary> @@ -78,7 +78,7 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status200OK)] public ActionResult<PublicSystemInfo> GetPublicSystemInfo() { - return _appHost.GetPublicSystemInfo(Request.HttpContext.Connection.RemoteIpAddress ?? IPAddress.Loopback); + return _appHost.GetPublicSystemInfo(Request); } /// <summary> |
