X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/6103246a73b77d4264afed927febf5eb4c38dad5..76672f43452be5fb86ed140cc15b43c786cd75c2:/lib/functions.php?ds=sidebyside 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)