X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/5bd3412d378c6de75c36737b5fd93eb214945469..76672f43452be5fb86ed140cc15b43c786cd75c2:/lib/functions.php?ds=inline 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)