reference: use distribution reference and remove fork
handleWithGlobalMiddlewares
handlerWithGlobalMiddlewares