code: protected function redirect(Response $response, int $code, string $url): Response
      {
          return $response->withStatus($code)->withHeader('Location', $url);
      }
docs: Redirects the user to another URL.
  
  @param \Psr\Http\Message\ResponseInterface $response  The HTTP response
  @return \Psr\Http\Message\ResponseInterface  The new response