Update MediaBrowser.Common/Extensions/HttpContextExtensions.cs

Co-authored-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
Claus Vium 2020-09-02 15:27:54 +02:00 committed by GitHub
parent 38be506849
commit b9cd6a125b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,7 @@ namespace MediaBrowser.Common.Extensions
public static string RemoteIp(this HttpRequest request) 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)) if (!string.IsNullOrEmpty(cachedRemoteIp))
{ {
return cachedRemoteIp; return cachedRemoteIp;
} }