mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Update common.php
This commit is contained in:
parent
e057bb077f
commit
c95a3285be
15
common.php
15
common.php
@ -37,13 +37,16 @@ header('X-Frame-Options: SAMEORIGIN');
|
||||
header('X-Powered-By: TorrentPier LTS Forever!');
|
||||
|
||||
// Set remote address
|
||||
if (isset($_SERVER['HTTP_CF_CONNECTING_IP']))
|
||||
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
|
||||
{
|
||||
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; // Cloudflare
|
||||
}
|
||||
elseif (isset($_SERVER['HTTP_FASTLY_CLIENT_IP']))
|
||||
{
|
||||
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_FASTLY_CLIENT_IP']; // Fastly
|
||||
if (isset($_SERVER['HTTP_CF_CONNECTING_IP']))
|
||||
{
|
||||
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; // Cloudflare
|
||||
}
|
||||
elseif (isset($_SERVER['HTTP_FASTLY_CLIENT_IP']))
|
||||
{
|
||||
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_FASTLY_CLIENT_IP']; // Fastly
|
||||
}
|
||||
}
|
||||
|
||||
// Get initial config
|
||||
|
Loading…
Reference in New Issue
Block a user