From 4746e38cb27185d3fe063eb7184c1d10f687c9a1 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Fri, 6 Oct 2023 18:31:42 +0200 Subject: [PATCH] :bug: Add no cache instructions to streamer Attempt to fix buffering issue when Cloudflare proxy is enabled --- apps/viewer/src/app/api/integrations/openai/streamer/route.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/viewer/src/app/api/integrations/openai/streamer/route.ts b/apps/viewer/src/app/api/integrations/openai/streamer/route.ts index e0feb3e1c..8aeb8b692 100644 --- a/apps/viewer/src/app/api/integrations/openai/streamer/route.ts +++ b/apps/viewer/src/app/api/integrations/openai/streamer/route.ts @@ -12,6 +12,8 @@ export const dynamic = 'force-dynamic' const responseHeaders = { 'Access-Control-Allow-Origin': '*', + 'Cache-Control': 'no-store, no-cache, must-revalidate, proxy-revalidate', + Pragma: 'no-cache', } export async function OPTIONS() {