protected function addHeader($signature, $tooManyAttempts = false)
    {
        /** @var \Phalcon\Http\Response $response */
        $response = $this->getDI()->getShared(Services::RESPONSE);

        $limiter = $this->getLimiter();

        $response->setHeader('X-RateLimit-Limit', $this->max);
        if ($tooManyAttempts) {
            $msg = StatusCode::message(StatusCode::TOO_MANY_REQUESTS);

            $response
                ->setContent($msg)
                ->setStatusCode(StatusCode::TOO_MANY_REQUESTS, $msg)
                ->setHeader('X-RateLimit-Remaining', 0)
                ->setHeader(
                'Retry-After',
                $limiter->availableIn($signature, $this->decay)
            );
        } else {
            $response->setHeader(
                'X-RateLimit-Remaining',
                $limiter->retriesLeft($signature, $this->max, $this->decay)
            );
        }
    }