change middleware definition to comma separated list