Support reverse proxies
Signed-off-by: droy <denis.roy@eclipse-foundation.org>
diff --git a/download.php b/download.php
index 7881a13..d4bfb03 100755
--- a/download.php
+++ b/download.php
@@ -126,8 +126,7 @@
$_country_code = "xx";
}
- $remote_addr = $_SERVER['REMOTE_ADDR'];
- //$remote_addr = '69.157.112.107'; #DEBUG
+ $remote_addr = $App->getClientRealIP();
$ip_ccode = $Mirror->selectCountryCodeByIP($remote_addr);
if($_debug == 1) {
echo "Country given: " . $_country_code . " IP Geolocation: " . $ip_ccode . "<br />";