protected function isHeaderAllowed(?string $header)
    {
        if ($this->isAllHeadersAllowed()) {
            return true;
        }

        return in_array(strtolower($header), $this->allowHeaders);
    }
protected function isHeaderAllowed(?string $header)
    {
        if ($this->isAllHeadersAllowed()) {
            return true;
        }

        return in_array(strtolower($header), $this->allowHeaders);
    }
protected function isHeaderAllowed ( ? string $ header ) { if ( $ this -> isAllHeadersAllowed ( ) ) { return true ; } return in_array ( strtolower ( $ header ) , $ this -> allowHeaders ) ; }
Returns whether or not the header is allowed.

@param string|null $header

@return bool
Returns whether or not the header is allowed .