@@ 870-874 (lines=5) @@ | ||
867 | $server_name = $_SERVER['SERVER_NAME']; |
|
868 | } |
|
869 | ||
870 | if (isNullOrEmpty($server_name) && isNotNullOrEmpty($logPath)) { |
|
871 | $msg = 'No server name given for calling curl ' . $url . ' behind proxy or LB'; |
|
872 | logToFile($logPath, $msg); |
|
873 | return false; |
|
874 | } |
|
875 | ||
876 | if (isNullOrEmpty($localServerIpAddress) && isNotNullOrEmptyArrayKey($_SERVER, 'SERVER_ADDR')) { |
|
877 | $localServerIpAddress = $_SERVER['SERVER_ADDR']; |
|
@@ 880-884 (lines=5) @@ | ||
877 | $localServerIpAddress = $_SERVER['SERVER_ADDR']; |
|
878 | } |
|
879 | ||
880 | if (isNullOrEmpty($localServerIpAddress) && isNotNullOrEmpty($logPath)) { |
|
881 | $msg = 'No localIPAddress given for calling curl ' . $url . ' behind proxy or LB'; |
|
882 | logToFile($logPath, $msg); |
|
883 | return false; |
|
884 | } |
|
885 | ||
886 | $url = str_replace($server_name, $localServerIpAddress, $url); |
|
887 |