Added currentPage, nextUrl, prevUrl to middleware