public function Request::isSecure

Checks whether the request is secure or not.

@api

Return value

Boolean

1 call to Request::isSecure()
Request::getScheme in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php
Gets the request's scheme.

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php, line 862

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

public function isSecure() {
  return strtolower($this->server
    ->get('HTTPS')) == 'on' || $this->server
    ->get('HTTPS') == 1 || (self::$trustProxy && strtolower($this->headers
    ->get('SSL_HTTPS')) == 'on' || $this->headers
    ->get('SSL_HTTPS') == 1) || self::$trustProxy && strtolower($this->headers
    ->get('X_FORWARDED_PROTO')) == 'https';
}