[feature/settings-custom-middleware] added middleware to settings