From d0f6c70df57855bbcbe03e6af12a91d60a5a2aae Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Wed, 9 Jan 2019 11:38:21 +0200 Subject: [PATCH] Add fallback ip address for unix sockets Fixes #2966 --- src/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.js b/src/server.js index 118e437f..caf4e1fe 100644 --- a/src/server.js +++ b/src/server.js @@ -226,7 +226,7 @@ function getClientLanguage(socket) { } function getClientIp(socket) { - let ip = socket.handshake.address; + let ip = socket.handshake.address || "127.0.0.1"; if (Helper.config.reverseProxy) { const forwarded = (socket.request.headers["x-forwarded-for"] || "").split(/\s*,\s*/).filter(Boolean);