Add func to set an entire stack of middleware