diff --git a/CHANGELOG.md b/CHANGELOG.md index ca9bd0bd4..8381d64c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ **Merged pull requests:** - Release 2.4.1 🦉 ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) +- Added support for fastly cdn [\#1327](https://github.com/torrentpier/torrentpier/pull/1327) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) - Used declensions for days in some cases [\#1310](https://github.com/torrentpier/torrentpier/pull/1310) ([belomaxorka](https://github.com/belomaxorka)) - Used datastore to show statistic for more performance [\#1309](https://github.com/torrentpier/torrentpier/pull/1309) ([belomaxorka](https://github.com/belomaxorka)) - Used `humn_size()` to count average of releases in tr_stats.php [\#1313](https://github.com/torrentpier/torrentpier/pull/1313) ([belomaxorka](https://github.com/belomaxorka)) @@ -13,7 +14,7 @@ - Set response code in some cases [\#1319](https://github.com/torrentpier/torrentpier/pull/1319) ([belomaxorka](https://github.com/belomaxorka)) - Fixed HTTP 500 while cron running in server-side [\#1321](https://github.com/torrentpier/torrentpier/pull/1321) ([belomaxorka](https://github.com/belomaxorka)) - Sending debug errors to us 🌚 via Telegram bot [\#1323](https://github.com/torrentpier/torrentpier/pull/1323) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1306](https://github.com/torrentpier/torrentpier/pull/1306), [\#1307](https://github.com/torrentpier/torrentpier/pull/1307), [\#1308](https://github.com/torrentpier/torrentpier/pull/1308), [\#1315](https://github.com/torrentpier/torrentpier/pull/1315) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#1306](https://github.com/torrentpier/torrentpier/pull/1306), [\#1307](https://github.com/torrentpier/torrentpier/pull/1307), [\#1308](https://github.com/torrentpier/torrentpier/pull/1308), [\#1315](https://github.com/torrentpier/torrentpier/pull/1315), [\#1328](https://github.com/torrentpier/torrentpier/pull/1328) ([belomaxorka](https://github.com/belomaxorka)) - Some bugfixes [\#1326](https://github.com/torrentpier/torrentpier/pull/1326) ([belomaxorka](https://github.com/belomaxorka)) - Updated deps [\#1304](https://github.com/torrentpier/torrentpier/pull/1304), [\#1305](https://github.com/torrentpier/torrentpier/pull/1305) ([belomaxorka](https://github.com/belomaxorka)) diff --git a/common.php b/common.php index be153b99f..3ba700bd2 100644 --- a/common.php +++ b/common.php @@ -45,7 +45,7 @@ date_default_timezone_set('UTC'); $allowedCDNs = ['HTTP_X_FORWARDED_FOR', 'HTTP_FASTLY_CLIENT_IP', 'HTTP_CF_CONNECTING_IP']; foreach ($allowedCDNs as $allowedCDN) { if (isset($_SERVER[$allowedCDN]) && filter_var($_SERVER[$allowedCDN], FILTER_VALIDATE_IP)) { - $_SERVER['REMOTE_ADDR'] = $allowedCDN; + $_SERVER['REMOTE_ADDR'] = $_SERVER[$allowedCDN]; } }