Merge pull request #30 from skipperbent/development

[FEATURE] Added getIsSecure method to Request class.
This commit is contained in:
Simon Sessingø
2015-11-18 19:20:11 +01:00
+4
View File
@@ -30,6 +30,10 @@ class Request {
$this->headers = array_change_key_case(getallheaders(), CASE_LOWER);
}
public function getIsSecure() {
return isset($_SERVER['HTTPS']) ? true : (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] === 443);
}
/**
* @return string
*/