From f8c1f91b73939eaffec9f1214bc55607015ba52c Mon Sep 17 00:00:00 2001 From: Louis Date: Mon, 22 Jan 2024 19:56:37 +0700 Subject: [PATCH] fix: API chat/completion is blocked by CORS (#1705) --- core/src/node/api/common/builder.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/node/api/common/builder.ts b/core/src/node/api/common/builder.ts index 953daa7da..14946f415 100644 --- a/core/src/node/api/common/builder.ts +++ b/core/src/node/api/common/builder.ts @@ -317,6 +317,7 @@ export const chatCompletions = async (request: any, reply: any) => { 'Content-Type': 'text/event-stream', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive', + "Access-Control-Allow-Origin": "*" }) const headers: Record = {