Move HttpListenerHost middleware up the pipeline

This commit is contained in:
Claus Vium
2020-09-03 00:31:42 +02:00
parent b9cd6a125b
commit 5813f8073c
5 changed files with 85 additions and 318 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;