code: public function handle(ServerRequestInterface $request, ServerFrame $frame) : ResponseInterface
      {
          $this->session->start($request);
  
          $response = $frame->next($request);
  
          // if the session is started it will be written back and a cookie will be set
          if ($this->session->isStarted()) {
              $this->session->save();
              return $response->withHeader('Set-Cookie', 'aviator=' . $this->session->getId(). ';');
          }
  
          return $response;
      }
docs: @param ServerRequestInterface $request
  @param ServerFrame            $frame
  
  @return ResponseInterface