mirror of
https://github.com/thelounge/thelounge
synced 2024-11-23 12:33:07 +00:00
Merge pull request #2967 from thelounge/xpaw/fix-2966
Add fallback ip address for unix sockets
This commit is contained in:
commit
185fb9c71c
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue