Fix bug HTTPS detection (issue with IIS)

This commit is contained in:
Frédéric Guillot
2014-09-08 16:49:54 +02:00
parent 532ea3b868
commit bc0fa40b24
5 changed files with 29 additions and 5 deletions

View File

@@ -65,7 +65,7 @@ function markdown($text)
function get_current_base_url()
{
$url = isset($_SERVER['HTTPS']) ? 'https://' : 'http://';
$url = \Core\Tool::isHTTPS() ? 'https://' : 'http://';
$url .= $_SERVER['SERVER_NAME'];
$url .= $_SERVER['SERVER_PORT'] == 80 || $_SERVER['SERVER_PORT'] == 443 ? '' : ':'.$_SERVER['SERVER_PORT'];
$url .= dirname($_SERVER['PHP_SELF']) !== '/' ? dirname($_SERVER['PHP_SELF']).'/' : '/';