aboutsummaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-07-18 08:26:39 +0300
committerkaotisk <kaotisk@arching-kaos.org>2024-07-18 08:26:39 +0300
commitce5081ad8d5b089e45788c4294546b942f3d8cb0 (patch)
tree5c0c72f6ee3881d4449771e909a478590df1af86 /api
parent5f8db9fb7fe82e00fa7310ef40d38d1ae734b9af (diff)
downloadarching-kaos-tools-ce5081ad8d5b089e45788c4294546b942f3d8cb0.tar.gz
arching-kaos-tools-ce5081ad8d5b089e45788c4294546b942f3d8cb0.tar.bz2
arching-kaos-tools-ce5081ad8d5b089e45788c4294546b942f3d8cb0.zip
fixed cors
Diffstat (limited to 'api')
-rwxr-xr-xapi/index.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/api/index.js b/api/index.js
index b39ee07..943196a 100755
--- a/api/index.js
+++ b/api/index.js
@@ -97,6 +97,7 @@ function requestParser(req, res)
printRequest(req);
akLogMessage('INFO', `Incoming from [${req.connection.remoteAddress}]:${req.socket._peername.port} @ ${req.headers.host}${req.url}`);
if (checkIfAllowedIP(req.connection.remoteAddress)){
+ res.setHeader('Access-Control-Allow-Origin', '*');
processMethod(req, res);
}
else {