diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-10-11 06:42:04 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-10-11 06:42:04 +0300 |
commit | 54bbbc85488fb29acb71a1a6d2e53eefba32c8ca (patch) | |
tree | d6a19c0e940d6882a6f81157e42cdbd1410e88c7 | |
parent | 8cca8d05cd42a42e16d6dc5966fb1670154f04a6 (diff) | |
download | arching-kaos-radio-54bbbc85488fb29acb71a1a6d2e53eefba32c8ca.tar.gz arching-kaos-radio-54bbbc85488fb29acb71a1a6d2e53eefba32c8ca.tar.bz2 arching-kaos-radio-54bbbc85488fb29acb71a1a6d2e53eefba32c8ca.zip |
Fix accidental removal
-rwxr-xr-x | server/index.js | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/server/index.js b/server/index.js index 4f2e8b8..589d7db 100755 --- a/server/index.js +++ b/server/index.js @@ -148,22 +148,12 @@ 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(); - } + res.setHeader('Access-Control-Allow-Origin', '*'); + processMethod(req, res); } const server = http.createServer(serverOptions, requestParser); |