mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
[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);
|
||||
}
|
||||
|
||||
public function getIsSecure() {
|
||||
return isset($_SERVER['HTTPS']) ? true : (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] === 443);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user