mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
parent
a438031c68
commit
7ee71887f2
2 changed files with 3 additions and 2 deletions
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue