Fallback to visitor IP address when CloudFlare IP address header is missing
Resolves #232.
This commit is contained in:
parent
13aff83a30
commit
013270c532
1 changed files with 2 additions and 2 deletions
|
@ -212,8 +212,8 @@ function deletePostImages($post) {
|
|||
|
||||
function deletePost($id) {
|
||||
$id = intval($id);
|
||||
$is_op = false;
|
||||
|
||||
$is_op = false;
|
||||
$parent = 0;
|
||||
$op = array();
|
||||
$posts = postsInThreadByID($id, false);
|
||||
|
@ -969,7 +969,7 @@ function stripMetadata($filename) {
|
|||
}
|
||||
|
||||
function remoteAddress() {
|
||||
if (TINYIB_CLOUDFLARE) {
|
||||
if (TINYIB_CLOUDFLARE && isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
|
||||
return $_SERVER['HTTP_CF_CONNECTING_IP'];
|
||||
}
|
||||
return $_SERVER['REMOTE_ADDR'];
|
||||
|
|
Loading…
Reference in a new issue