From 8426f0e6cb8f1325f76089f2dd99c05c2089f476 Mon Sep 17 00:00:00 2001 From: torvista Date: Sat, 18 Aug 2018 23:45:20 +0200 Subject: [PATCH] Main url auto-filled field was hardcoded as http: easy to overlook this when running installer via https. This sets protocol to be the same as the installer page. --- htdocs/install/inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 88dbc76f9a6..c1581d37392 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -566,7 +566,7 @@ function detect_dolibarr_main_url_root() $dolibarr_main_url_root = $_SERVER["SERVER_URL"] . $_SERVER["DOCUMENT_URI"]; } // If SCRIPT_URI, SERVER_URL, DOCUMENT_URI not defined (Ie: Apache 2.0.44 for Windows) else { - $proto = 'http'; + $proto = ( (!empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') || $_SERVER['SERVER_PORT'] == 443) ? 'https' : 'http'; if (!empty($_SERVER["HTTP_HOST"])) { $serverport = $_SERVER["HTTP_HOST"]; } else {