@@ 860-864 (lines=5) @@ | ||
857 | $server_name = $_SERVER['SERVER_NAME']; |
|
858 | } |
|
859 | ||
860 | if (isNullOrEmpty($server_name) && isNotNullOrEmpty($logPath)) { |
|
861 | $msg = 'No server name given for calling curl ' . $url . ' behind proxy or LB'; |
|
862 | logToFile($logPath, $msg); |
|
863 | return false; |
|
864 | } |
|
865 | ||
866 | if (isNullOrEmpty($localServerIpAddress) && isNotNullOrEmptyArrayKey($_SERVER, 'SERVER_ADDR')) { |
|
867 | $localServerIpAddress = $_SERVER['SERVER_ADDR']; |
|
@@ 870-874 (lines=5) @@ | ||
867 | $localServerIpAddress = $_SERVER['SERVER_ADDR']; |
|
868 | } |
|
869 | ||
870 | if (isNullOrEmpty($localServerIpAddress) && isNotNullOrEmpty($logPath)) { |
|
871 | $msg = 'No localIPAddress given for calling curl ' . $url . ' behind proxy or LB'; |
|
872 | logToFile($logPath, $msg); |
|
873 | return false; |
|
874 | } |
|
875 | ||
876 | $url = str_replace($server_name, $localServerIpAddress, $url); |
|
877 |