import type { NextConfig } from "next"; const nextConfig: NextConfig = { async headers() { /** https://nextjs.org/docs/app/building-your-application/deploying#streaming-and-suspense * The Next.js App Router supports streaming responses when self-hosting. * * If you are using Nginx or a similar proxy, you will need to configure it * to disable buffering to enable streaming. * * For example, you can disable buffering in Nginx by setting X-Accel-Buffering to no: */ return [ { source: '/:path*{/}?', headers: [ { key: 'X-Accel-Buffering', value: 'no', }, ], }, ] }, } export default nextConfig;