From 76672f43452be5fb86ed140cc15b43c786cd75c2 Mon Sep 17 00:00:00 2001 From: Patrick Canterino Date: Thu, 27 Apr 2023 20:17:07 +0200 Subject: [PATCH 1/1] Provide URL scheme in installer --- lib/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/functions.php b/lib/functions.php index 064d3a1..ecd7be8 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -1638,7 +1638,8 @@ function jirafeau_add_ending_slash($path) function jirafeau_default_web_root() { - return $_SERVER['HTTP_HOST'] . str_replace('install.php', '', $_SERVER['REQUEST_URI']); + $url_scheme = (isset($_SERVER['HTTPS'])) ? 'https://' : 'http://'; + return $url_scheme . $_SERVER['HTTP_HOST'] . str_replace('install.php', '', $_SERVER['REQUEST_URI']); } function jirafeau_get_download_stats($hash) -- 2.34.1