Enable installation in HTTPS-only enviroment (#2033)
authorClemens K <github@clemensklug.de>
Mon, 30 May 2016 16:13:07 +0000 (18:13 +0200)
committerTim Düsterhus <timwolla@googlemail.com>
Mon, 30 May 2016 16:13:07 +0000 (18:13 +0200)
wcfsetup/install/files/lib/system/WCFSetup.class.php

index 3e6307cb347b31b4bf6e21b00fa5e912e13d883b..022de7a2c12d3fe17d9257b732c100e126745b35 100644 (file)
@@ -13,6 +13,7 @@ use wcf\system\io\File;
 use wcf\system\io\Tar;
 use wcf\system\language\LanguageFactory;
 use wcf\system\package\PackageArchive;
+use wcf\system\request\RouteHandler;
 use wcf\system\session\ACPSessionFactory;
 use wcf\system\session\SessionHandler;
 use wcf\system\setup\Installer;
@@ -466,7 +467,7 @@ class WCFSetup extends WCF {
                
                // domain
                $domainName = '';
-               if (!empty($_SERVER['SERVER_NAME'])) $domainName = 'http://' . $_SERVER['SERVER_NAME'];
+               if (!empty($_SERVER['SERVER_NAME'])) $domainName = RouteHandler::getProtocol() . $_SERVER['SERVER_NAME'];
                // port
                if (!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != 80) $domainName .= ':' . $_SERVER['SERVER_PORT'];
                // script url