aboutsummaryrefslogtreecommitdiff
path: root/api/index.js
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2025-03-20 04:53:00 +0200
committerkaotisk <kaotisk@arching-kaos.org>2025-03-20 04:53:00 +0200
commit823e381ca557b3c7f034aa44ac9193bb79cbe97c (patch)
tree1b1e0d1457122cc1d739cd0048e2248ea4403d29 /api/index.js
parent230abb69a127d4af1f38c853897c6deaa611cd92 (diff)
downloadarching-kaos-tools-823e381ca557b3c7f034aa44ac9193bb79cbe97c.tar.gz
arching-kaos-tools-823e381ca557b3c7f034aa44ac9193bb79cbe97c.tar.bz2
arching-kaos-tools-823e381ca557b3c7f034aa44ac9193bb79cbe97c.zip
[api] store incoming requests' IPs for future use
Diffstat (limited to 'api/index.js')
-rwxr-xr-xapi/index.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/api/index.js b/api/index.js
index 3394a0d..f5cf8c8 100755
--- a/api/index.js
+++ b/api/index.js
@@ -15,12 +15,14 @@ const getRemotePeers = require('./routes/getRemotePeers/index.js');
const akLogMessage = require('./lib/akLogMessage');
const checkIfAllowedIP = require('./lib/checkIfAllowedIP/index.js');
+const storeIncomingIP = require("./lib/storeIncomingIP/index.js");
akLogMessage('INFO', 'akLogMessage loaded');
const serverOptions = { keepAliveTimeout: 60000 };
function printRequest(req)
{
+ storeIncomingIP(req.connection.remoteAddress);
console.log(req.connection.remoteAddress);
console.log(req.headers.host);
console.log(req.headers);