Fix IP determination

This commit is contained in:
Evert Prants 2019-02-28 17:30:11 +02:00
parent 2faffdf8c0
commit 13a6db44a9
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

View File

@ -228,10 +228,8 @@ async function init () {
// Lets begin our trials // Lets begin our trials
// Determine Address from request headers // Determine Address from request headers
if (req.header('http_x_forwarded_for')) { if (req.header('x-forwarded-for')) {
v4 = req.header('http_x_forwarded_for') v4 = req.header('x-forwarded-for')
} else if (req.header('remote_addr')) {
v4 = req.header('remote_addr')
} else { } else {
v4 = req.connection.remoteAddress v4 = req.connection.remoteAddress
} }