*
* @author Roland Haeder <webmaster@ship-simu.org>
* @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
*
// 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)));
));
}
- // 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
* @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'
+ )
+ )
+ );
}
/**
// 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