httpAgentOptions
Dans les versions de Node.js antérieures à la 18, Next.js fournit automatiquement un polyfill pour fetch() avec undici et active HTTP Keep-Alive par défaut.
Pour désactiver HTTP Keep-Alive pour tous les appels fetch() côté serveur, ouvrez next.config.js et ajoutez la configuration httpAgentOptions :
module.exports = {
httpAgentOptions: {
keepAlive: false,
},
}