mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 12:52:14 +00:00
Merge pull request #30 from skipperbent/development
[FEATURE] Added getIsSecure method to Request class.
This commit is contained in:
@@ -30,6 +30,10 @@ class Request {
|
|||||||
$this->headers = array_change_key_case(getallheaders(), CASE_LOWER);
|
$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
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user