Renamed secure flag to https
This commit is contained in:
parent
53d8ab1137
commit
bdb4ca8ff0
1 changed files with 4 additions and 5 deletions
|
@ -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.');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue