httpAgentOptions
Last updated April 15, 2025
In Node.js versions prior to 18, Next.js automatically polyfillsfetch() withundici and enablesHTTP Keep-Alive by default.
To disable HTTP Keep-Alive for allfetch() calls on the server-side, opennext.config.js and add thehttpAgentOptions config:
next.config.js
module.exports= { httpAgentOptions: { keepAlive:false, },}Was this helpful?