The type requests in the new route system changed from NextApiequest to NextRequest and the middleware seems cannot work accordingly. any workaround?