From 6a7bc25352473207d587b55067c856d0d7f8f973 Mon Sep 17 00:00:00 2001 From: hans362 Date: Wed, 13 Sep 2023 13:19:22 +0800 Subject: [PATCH] :adhesive_bandage: Fix CORS issue --- api/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/index.js b/api/index.js index 54642b0..577d99a 100644 --- a/api/index.js +++ b/api/index.js @@ -14,10 +14,10 @@ app.get('/api', (req, res) => { Cookie: cookies } }).then((resp) => { - res.send(resp.data); + res.header("Access-Control-Allow-Origin", "*").send(resp.data); }).catch((err) => { console.log(err); - res.send(err); + res.header("Access-Control-Allow-Origin", "*").send(err); }); });