Add fallback ip address for unix sockets

Fixes #2966
This commit is contained in:
Pavel Djundik 2019-01-09 11:38:21 +02:00
parent 2a1e711f42
commit d0f6c70df5

View File

@ -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);