configure after middleware is added