문서
App Router 사용하기
httpAgentOptions

httpAgentOptions

Node.js 18 버전 이전에는 Next.js가 자동으로 fetch()undici로 폴리필하고 HTTP Keep-Alive를 기본적으로 활성화합니다.

서버 사이드의 모든 fetch() 호출에 대해 HTTP Keep-Alive를 비활성화하려면 next.config.js를 열고 httpAgentOptions 설정을 추가하세요:

next.config.js
module.exports = {
  httpAgentOptions: {
    keepAlive: false,
  },
};