serverMiddleware has been replaced by the new server engine called Nitro. Nitro provides a more powerful and flexible way to handle server-side logic, including API routes and middleware.server/middleware directory of your Nuxt 3 project.defineEventHandler() that can access and modify the request.serverMiddlewareserver/middlewaredefineEventHandler()export default defineEventHandler(async (event) => {
// Read the original body
const body = await readBody(event)
// Modify the body
body.additionalParam = 'your private token'
// Set the modified body back to the event
event.node.req.body = body
})