[FEATURE] Added getIsSecure method to Request class.

This commit is contained in:
Simon Sessingø
2015-11-18 19:19:15 +01:00
parent 388c027d04
commit 19dc295199
+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
*/