add ACAO header

This commit is contained in:
Archeb
2024-05-18 18:12:42 +08:00
parent 4ab0d44759
commit 381df5ab77
+1
View File
@@ -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) {