Add defualt for middleware.index