public function httpMiddles(Request $request): array
    {
        /** @var \Swoft\Http\Server\HttpDispatcher $dispatcher */
        $dispatcher = \bean('serverDispatcher');
        $middleType = (int)$request->query('type');

        // 1: only return user's
        if ($middleType === 1) {
            return $dispatcher->getMiddlewares();
        }

        return $dispatcher->requestMiddleware();
    }