fix: API chat/completion is blocked by CORS (#1705)

This commit is contained in:
Louis 2024-01-22 19:56:37 +07:00 committed by GitHub
parent 69ff85f66a
commit f8c1f91b73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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<string, any> = {