mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 19:59:56 +03:00
bug fix 1024 : the way to discover protocol (http/https) was not correct
git-svn-id: http://piwigo.org/svn/trunk@3403 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
05358f2c2d
commit
b7f3513d7e
1 changed files with 4 additions and 3 deletions
|
@ -58,13 +58,14 @@ function get_absolute_root_url($with_scheme=true)
|
|||
$url = '';
|
||||
if ($with_scheme)
|
||||
{
|
||||
if (empty($_SERVER['HTTPS']))
|
||||
if (isset($_SERVER['HTTPS']) &&
|
||||
((strtolower($_SERVER['HTTPS']) == 'on') or ($_SERVER['HTTPS'] == 1)))
|
||||
{
|
||||
$url .= 'http://';
|
||||
$url .= 'https://';
|
||||
}
|
||||
else
|
||||
{
|
||||
$url .= 'https://';
|
||||
$url .= 'http://';
|
||||
}
|
||||
$url .= $_SERVER['HTTP_HOST'];
|
||||
if ($_SERVER['SERVER_PORT'] != 80)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue