diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2020-04-26 13:19:58 +0200 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2020-04-26 13:19:58 +0200 |
commit | b4134dc5e2fe183d52e79ef1838f5b1acd9f7ff8 (patch) | |
tree | 5a8359829a07a7a949d0971bd857f0e382262631 /server/src | |
parent | remove save to file to log (diff) | |
download | hackchat-b4134dc5e2fe183d52e79ef1838f5b1acd9f7ff8.tar.gz hackchat-b4134dc5e2fe183d52e79ef1838f5b1acd9f7ff8.zip |
fixed strange localhost ip
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/serverLib/MainServer.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/serverLib/MainServer.js b/server/src/serverLib/MainServer.js index fcdd328..b463ede 100644 --- a/server/src/serverLib/MainServer.js +++ b/server/src/serverLib/MainServer.js @@ -155,7 +155,7 @@ class MainServer extends WsServer { // Don't penalize yet, but check whether IP is rate-limited console.log(socket.address) console.error(socket.address) - if (this.police.frisk(socket.address, 0) && socket.address.split(/\s*,\s*/)[0] != "127.0.0.1") { + if (this.police.frisk(socket.address, 0) && socket.address != "::ffff:172.18.0.1") { this.core.commands.handleCommand(this, socket, { cmd: 'socketreply', cmdKey: this.cmdKey, @@ -167,7 +167,7 @@ class MainServer extends WsServer { // Penalize here, but don't do anything about it // Don't penalize localhost for bots - if (socket.address != "127.0.0.1") { + if (socket.address != "::ffff:172.18.0.1") { this.police.frisk(socket.address, 1); } |