Fix IP determination
This commit is contained in:
parent
2faffdf8c0
commit
13a6db44a9
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user