From 381df5ab770a016a82db24fefdce21ee3b74537c Mon Sep 17 00:00:00 2001 From: Archeb Date: Sat, 18 May 2024 18:12:42 +0800 Subject: [PATCH] add ACAO header --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 62a7e77..2c1b70e 100644 --- a/index.js +++ b/index.js @@ -29,6 +29,7 @@ app.post("/v1/messages", apiKeyAuth, (req, res) => { req.on("end", async () => { res.setHeader("Content-Type", "text/event-stream;charset=utf-8"); + res.setHeader("Allow-Control-Allow-Origin", "*"); try { let jsonBody = JSON.parse(req.rawBody); if (jsonBody.stream == false) {