public function handle(ServerRequestInterface $request): ResponseInterface
        {
            if (!isset($this->middleware[$this->index])) {
                return $this->response;
            }
    
            $middleware = $this->middleware[$this->index];
            return $middleware->process($request, $this->next());
        }