httpAgentOptions
Node.js バージョン 18 より前のバージョンでは、Next.js は自動的に undici で fetch() をポリフィルし、デフォルトで HTTP Keep-Alive を有効にします。
サーバーサイドでのすべての fetch() 呼び出しで HTTP Keep-Alive を無効にするには、next.config.js を開き、httpAgentOptions 設定を追加します。
next.config.js
module.exports = {
httpAgentOptions: {
keepAlive: false,
},
}お役に立ちましたか?