Change generic type from Middleware to StreamTransformer.