Skip to content

Commit

Permalink
fix: API chat/completion is blocked by CORS (janhq#1705)
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan authored Jan 22, 2024
1 parent 69ff85f commit f8c1f91
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/src/node/api/common/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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> = {
Expand Down

0 comments on commit f8c1f91

Please sign in to comment.