Fixed issue with _SERVER['HTTPS'] being set on nginx
This commit is contained in:
parent
d20b3a83ff
commit
c27fbf8694
2 changed files with 4 additions and 4 deletions
|
@ -124,12 +124,12 @@ class Controller extends Object
|
|||
}
|
||||
|
||||
// Determines if we need to serve over HTTP or HTTPS
|
||||
if ($module->secure == false && isset($_SERVER['HTTPS']))
|
||||
if ($module->secure == false && isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'])
|
||||
{
|
||||
header('Location: http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
|
||||
exit;
|
||||
}
|
||||
elseif ($module->secure == true && !isset($_SERVER['HTTPS']))
|
||||
elseif ($module->secure == true && (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == false))
|
||||
{
|
||||
header('Location: https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
|
||||
exit;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue