Merge pull request #4043 from cvium/remove_shit_and_shit_adjacent_shit

Split HttpListenerHost into middlewares
This commit is contained in:
Anthony Lavado
2020-09-03 09:45:17 -04:00
committed by GitHub
18 changed files with 550 additions and 645 deletions

View File

@@ -28,7 +28,7 @@ namespace MediaBrowser.Common.Extensions
/// <returns>The remote caller IP address.</returns>
public static string RemoteIp(this HttpRequest request)
{
var cachedRemoteIp = request.HttpContext.Items["RemoteIp"].ToString();
var cachedRemoteIp = request.HttpContext.Items["RemoteIp"]?.ToString();
if (!string.IsNullOrEmpty(cachedRemoteIp))
{
return cachedRemoteIp;