diff --git a/web-server/app/api/stream/route.ts b/web-server/app/api/stream/route.ts index e372365d..397c424e 100644 --- a/web-server/app/api/stream/route.ts +++ b/web-server/app/api/stream/route.ts @@ -205,3 +205,9 @@ export async function GET(): Promise { } }); } + +// This line is necessary to prevent Next.js from attempting to statically generate this API route. +// It forces the route to be dynamically rendered on each request, which is crucial for our +// real-time streaming functionality. Without this, Next.js might try to pre-render the route +// during build time, leading to timeouts or incorrect behavior. +export const dynamic = "force-dynamic";