public function isSecure()
    {
        if ($proto = (string) $this->header->get('x_forwarded_proto')) {
            return in_array(strtolower(current(explode(',', $proto))), ['https', 'on', 'ssl', '1']);
        }

        return strtolower($this->server->get('HTTPS')) == 'on' || $this->server->get('HTTPS') == 1;
    }
public function isSecure()
    {
        if ($proto = (string) $this->header->get('x_forwarded_proto')) {
            return in_array(strtolower(current(explode(',', $proto))), ['https', 'on', 'ssl', '1']);
        }

        return strtolower($this->server->get('HTTPS')) == 'on' || $this->server->get('HTTPS') == 1;
    }
public function isSecure ( ) { if ( $ proto = ( string ) $ this -> header -> get ( 'x_forwarded_proto' ) ) { return in_array ( strtolower ( current ( explode ( ',' , $ proto ) ) ) , [ 'https' , 'on' , 'ssl' , '1' ] ) ; } return strtolower ( $ this -> server -> get ( 'HTTPS' ) ) == 'on' || $ this -> server -> get ( 'HTTPS' ) == 1 ; }
Returns true if request is made via SSL

@return bool
Returns true if request is made via SSL