aboutsummaryrefslogtreecommitdiff
path: root/server/index.js
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-10-11 06:35:13 +0300
committerkaotisk <kaotisk@arching-kaos.org>2024-10-11 06:35:13 +0300
commit754e2793da76a9181b0bb7e4f225497e52a24af6 (patch)
treed77308656992c111c5c361152061d8fc769416c6 /server/index.js
parent8cca8d05cd42a42e16d6dc5966fb1670154f04a6 (diff)
downloadarching-kaos-radio-754e2793da76a9181b0bb7e4f225497e52a24af6.tar.gz
arching-kaos-radio-754e2793da76a9181b0bb7e4f225497e52a24af6.tar.bz2
arching-kaos-radio-754e2793da76a9181b0bb7e4f225497e52a24af6.zip
Removed function checkIfAllowedIP(address)
Diffstat (limited to 'server/index.js')
-rwxr-xr-xserver/index.js12
1 files changed, 0 insertions, 12 deletions
diff --git a/server/index.js b/server/index.js
index 4f2e8b8..4526b8c 100755
--- a/server/index.js
+++ b/server/index.js
@@ -148,22 +148,10 @@ function processMethod(req, res)
}
}
-function checkIfAllowedIP(address)
-{
- return address.startsWith('fc') ? true : false;
-}
-
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 {
- res.end();
- }
}
const server = http.createServer(serverOptions, requestParser);