mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[feature/request-class] Add is_secure method to request for HTTPS
PHPBB3-9716
This commit is contained in:
@@ -326,6 +326,16 @@ class phpbb_request implements phpbb_request_interface
|
||||
return $this->header('X-Requested-With') == 'XMLHttpRequest';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the current request is happening over HTTPS.
|
||||
*
|
||||
* @return bool True if the request is secure.
|
||||
*/
|
||||
public function is_secure()
|
||||
{
|
||||
return $this->server('HTTPS') == 'on';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all variable names for a given super global
|
||||
*
|
||||
|
Reference in New Issue
Block a user