Changed removeTrailingSlash from route to middleware.