From 5ebebdb0ada642248909a2789162caf944210623 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Thu, 21 May 2015 16:37:32 +0200 Subject: [PATCH] Still more GeoIP debugging --- Logic/Support/General.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Logic/Support/General.cs b/Logic/Support/General.cs index d65f63e9..7320c5b0 100644 --- a/Logic/Support/General.cs +++ b/Logic/Support/General.cs @@ -62,10 +62,10 @@ namespace Swarmops.Logic.Support // All of this can be faked trivially by the client, so you can't rely on it for any kind of security. string forwardedIps = - HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; + HttpContext.Current.Request.Headers["X-Forwarded-For"]; string directIp = - HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]; + HttpContext.Current.Request.UserHostAddress; if (!string.IsNullOrEmpty (forwardedIps)) {