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.
This commit is contained in:
torvista 2018-08-18 23:45:20 +02:00
parent 9a82cc3261
commit 8426f0e6cb

View File

@ -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 {