Conditionally add a middleware to express with some common patterns