Added conditional middleware based on route info