DiasJunior·Jun 9, 2021Next.js API Routes: Implementing middlewaresUsing higher-order functions to implement middlewares in a straightfoward way