From 13a6db44a9b949415d248607149b9cd630b574e2 Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Thu, 28 Feb 2019 17:30:11 +0200 Subject: [PATCH] Fix IP determination --- applications/dyndns/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/applications/dyndns/index.js b/applications/dyndns/index.js index e08e029..39254dd 100644 --- a/applications/dyndns/index.js +++ b/applications/dyndns/index.js @@ -228,10 +228,8 @@ async function init () { // Lets begin our trials // Determine Address from request headers - if (req.header('http_x_forwarded_for')) { - v4 = req.header('http_x_forwarded_for') - } else if (req.header('remote_addr')) { - v4 = req.header('remote_addr') + if (req.header('x-forwarded-for')) { + v4 = req.header('x-forwarded-for') } else { v4 = req.connection.remoteAddress }