ticket:3 Changed the location of middleware