Remove the check for app.settings.env in the middleware.

This has no place in this module.