src/Valkyrja/Http/Server.php
public function getHeaders(): array
    {
        $headers        = [];
        $specialHeaders = self::SPECIAL_HEADERS;

        foreach ($this->collection as $key => $value) {
            if (
                \in_array($key, $specialHeaders, true)
                || 0 === strpos($key, 'HTTP_')
            ) {
                $headers[$this->getHeaderName($key)] = $value;
            }
        }

        return $headers;
    }
public function getHeaders(): array
    {
        $headers        = [];
        $specialHeaders = self::SPECIAL_HEADERS;

        foreach ($this->collection as $key => $value) {
            if (
                \in_array($key, $specialHeaders, true)
                || 0 === strpos($key, 'HTTP_')
            ) {
                $headers[$this->getHeaderName($key)] = $value;
            }
        }

        return $headers;
    }
Get all headers from server.

@return array