Support passing configuration from middleware