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
11
common.php
11
common.php
@ -37,13 +37,16 @@ header('X-Frame-Options: SAMEORIGIN');
|
|||||||
header('X-Powered-By: TorrentPier LTS Forever!');
|
header('X-Powered-By: TorrentPier LTS Forever!');
|
||||||
|
|
||||||
// Set remote address
|
// Set remote address
|
||||||
if (isset($_SERVER['HTTP_CF_CONNECTING_IP']))
|
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
|
||||||
{
|
{
|
||||||
|
if (isset($_SERVER['HTTP_CF_CONNECTING_IP']))
|
||||||
|
{
|
||||||
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; // Cloudflare
|
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; // Cloudflare
|
||||||
}
|
}
|
||||||
elseif (isset($_SERVER['HTTP_FASTLY_CLIENT_IP']))
|
elseif (isset($_SERVER['HTTP_FASTLY_CLIENT_IP']))
|
||||||
{
|
{
|
||||||
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_FASTLY_CLIENT_IP']; // Fastly
|
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_FASTLY_CLIENT_IP']; // Fastly
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get initial config
|
// Get initial config
|
||||||
|
Loading…
Reference in New Issue
Block a user