Found easier way to configure middleware for prism