X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=framework%2Fbootstrap%2Fclass_FrameworkBootstrap.php;h=c8141169428e144df086ccd36d49b4a01fcee8e4;hb=f57dd51863ec9baacba447d76b46d5c709b9b02e;hp=26c419daf0dc42f1a124627a896c3e919e968338;hpb=cb2db812f0d8ce380b8ace226044f448467e7074;p=core.git diff --git a/framework/bootstrap/class_FrameworkBootstrap.php b/framework/bootstrap/class_FrameworkBootstrap.php index 26c419da..c8141169 100644 --- a/framework/bootstrap/class_FrameworkBootstrap.php +++ b/framework/bootstrap/class_FrameworkBootstrap.php @@ -29,7 +29,7 @@ use \SplFileInfo; * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2019 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -237,6 +237,7 @@ final class FrameworkBootstrap { // Load basic include files to continue bootstrapping self::loadInclude(new SplFileInfo(sprintf('%smain%sinterfaces%sclass_FrameworkInterface.php', ApplicationEntryPoint::detectFrameworkPath(), DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR))); self::loadInclude(new SplFileInfo(sprintf('%smain%sclasses%sclass_BaseFrameworkSystem.php', ApplicationEntryPoint::detectFrameworkPath(), DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR))); + self::loadInclude(new SplFileInfo(sprintf('%smain%sclasses%sutils%sclass_StringUtils.php', ApplicationEntryPoint::detectFrameworkPath(), DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR))); self::loadInclude(new SplFileInfo(sprintf('%smain%sinterfaces%sregistry%sclass_Registerable.php', ApplicationEntryPoint::detectFrameworkPath(), DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR))); self::loadInclude(new SplFileInfo(sprintf('%sconfig%sclass_FrameworkConfiguration.php', ApplicationEntryPoint::detectFrameworkPath(), DIRECTORY_SEPARATOR))); @@ -362,9 +363,6 @@ final class FrameworkBootstrap { )); } - // Set it in registry - GenericRegistry::getRegistry()->addInstance('application', $applicationInstance); - // Now call all methods in one go foreach (array('setupApplicationData', 'initApplication', 'launchApplication') as $methodName) { // Debug message @@ -480,7 +478,21 @@ final class FrameworkBootstrap { * @todo Test more fields */ public static function isHttpSecured () { - return (isset($_SERVER['HTTPS'])); + return ( + ( + ( + isset($_SERVER['HTTPS']) + ) && ( + strtolower($_SERVER['HTTPS']) == 'on' + ) + ) || ( + ( + isset($_SERVER['HTTP_X_FORWARDED_PROTO']) + ) && ( + strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https' + ) + ) + ); } /** @@ -495,7 +507,7 @@ final class FrameworkBootstrap { // Do we have HTTPS? if (self::isHttpSecured()) { // Add the >s< for HTTPS - $protocol = 's'; + $protocol = 'https'; } // END - if // Construct the full URL and secure it against CSRF attacks