Renamed secure flag to https

This commit is contained in:
Josh Sherman 2014-09-27 14:02:52 -04:00
parent 53d8ab1137
commit bdb4ca8ff0

View file

@ -28,13 +28,13 @@
class Resource extends Object class Resource extends Object
{ {
/** /**
* Secure * HTTPS
* *
* Whether or not the page should be loaded via SSL. * Whether or not the page should be loaded via HTTP Secure.
* *
* @var boolean defaults to false * @var boolean defaults to false
*/ */
public $secure = false; public $https = false;
/** /**
* Filter * Filter
@ -80,8 +80,7 @@ class Resource extends Object
try try
{ {
// Determines if we need to serve over HTTP or HTTPS // Determines if we need to serve over HTTP or HTTPS
if ($this->secure if ($this->https && (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == false))
&& (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == false))
{ {
throw new Exception('400 - SSL is required.'); throw new Exception('400 - SSL is required.');
} }