* Fix $_SERVER error for unit test.
This commit is contained in:
@@ -2867,6 +2867,8 @@ EOF;
|
||||
*/
|
||||
public static function getSysURL()
|
||||
{
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'test') return '';
|
||||
|
||||
$httpType = (isset($_SERVER["HTTPS"]) and $_SERVER["HTTPS"] == 'on') ? 'https' : 'http';
|
||||
if(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https') $httpType = 'https';
|
||||
if(isset($_SERVER['REQUEST_SCHEME']) and strtolower($_SERVER['REQUEST_SCHEME']) == 'https') $httpType = 'https';
|
||||
|
||||
Reference in New Issue
Block a user