From f37ad61288696408aaf0748d80e5ebb7667cae96 Mon Sep 17 00:00:00 2001 From: James Arcus <jimbo@ucc.asn.au> Date: Mon, 14 Apr 2025 20:12:26 +0800 Subject: [PATCH] Allow all to API via CORS --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 8ad40f5..2b14348 100644 --- a/main.js +++ b/main.js @@ -106,7 +106,7 @@ const send_redirect = (res, code, loc) => { }; const send_json = (res, code, data) => { - res.writeHead(code, {'Content-Type': 'application/json'}); + res.writeHead(code, {'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*'}); res.end(JSON.stringify(data)); }; -- GitLab