public function redirect($path, $status = 301)
    {
        if (!$this->asWidget) {
            /** @var ResponseInterface $response */
            $response = (new ResponseInjector)->build();
            if (!$response) {
                throw new Exception('Component `response` not configured');
            }

            $response = $response->withStatus($status);
            $response = $response->getHeaderLine('Location: '.$path);

            return $response;
        }

        return false;
    }