From 754e2793da76a9181b0bb7e4f225497e52a24af6 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Fri, 11 Oct 2024 06:35:13 +0300 Subject: Removed function checkIfAllowedIP(address) --- server/index.js | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'server') 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); -- cgit v1.2.3