src/ThrottleTrait.php
protected function _setHeaders($response)
    {
        $headers = $this->getConfig('headers');

        if (!is_array($headers)) {
            return $response;
        }

        return $response
            ->withHeader($headers['limit'], (string)$this->getConfig('limit'))
            ->withHeader($headers['remaining'], (string)$this->_getRemainingConnections())
            ->withHeader(
                $headers['reset'],
                (string)Cache::read($this->_getCacheExpirationKey(), static::$cacheConfig)
            );
    }
protected function _setHeaders($response)
    {
        $headers = $this->getConfig('headers');

        if (!is_array($headers)) {
            return $response;
        }

        return $response
            ->withHeader($headers['limit'], (string)$this->getConfig('limit'))
            ->withHeader($headers['remaining'], (string)$this->_getRemainingConnections())
            ->withHeader(
                $headers['reset'],
                (string)Cache::read($this->_getCacheExpirationKey(), static::$cacheConfig)
            );
    }
protected function _setHeaders ( $ response ) { $ headers = $ this -> getConfig ( 'headers' ) ; if ( ! is_array ( $ headers ) ) { return $ response ; } return $ response -> withHeader ( $ headers [ 'limit' ] , ( string ) $ this -> getConfig ( 'limit' ) ) -> withHeader ( $ headers [ 'remaining' ] , ( string ) $ this -> _getRemainingConnections ( ) ) -> withHeader ( $ headers [ 'reset' ] , ( string ) Cache :: read ( $ this -> _getCacheExpirationKey ( ) , static :: $ cacheConfig ) ) ; }
Extends response with X-headers containing rate limiting information.

@param \Psr\Http\Message\ResponseInterface|\Cake\Network\Response $response ResponseInterface instance
@return \Psr\Http\Message\ResponseInterface
Extends response with X - headers containing rate limiting information .