fix Middleware:  app configuration