A node.js middleware for setting render and redirect options on the req object