Implemented secure variable in the module, removed request variable and will potentially add it back in at a later time.

This commit is contained in:
Josh Sherman 2010-11-25 01:52:00 -05:00
parent 985deaf18a
commit 14f0efbea0
2 changed files with 12 additions and 15 deletions

View file

@ -138,6 +138,18 @@ class Controller extends Object
$module = new Module();
}
// Determines if we need to serve over HTTP or HTTPS
if ($module->secure == false && isset($_SERVER['HTTPS']))
{
header('Location: http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
exit;
}
elseif ($module->secure == true && !isset($_SERVER['HTTPS']))
{
header('Location: https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
exit;
}
// Establishes the session
if (ini_get('session.auto_start') == 0)
{