Fixed issue with nginx HTTPS global

Variable was set to an empty string and being evaluated as true.
This commit is contained in:
Josh Sherman 2012-12-13 16:05:34 -05:00
parent 33bbcc014b
commit 0c2aaafefc
2 changed files with 2 additions and 2 deletions

View file

@ -53,7 +53,7 @@ class Browser
{
if (strpos($destination, '://') === false)
{
$destination = 'http' . ((!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') ? '' : 's') . '://' . $_SERVER['HTTP_HOST'] . $destination;
$destination = 'http' . ((!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off' || $_SERVER['HTTPS'] == '') ? '' : 's') . '://' . $_SERVER['HTTP_HOST'] . $destination;
}
header('Location: ' . $destination);

View file

@ -358,7 +358,7 @@ class Browser
{
if (strpos($destination, '://') === false)
{
$destination = 'http' . ((!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') ? '' : 's') . '://' . $_SERVER['HTTP_HOST'] . $destination;
$destination = 'http' . ((!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off' || $_SERVER['HTTPS'] == '') ? '' : 's') . '://' . $_SERVER['HTTP_HOST'] . $destination;
}
header('Location: ' . $destination);