Skip to content

Commit

Permalink
update for forwarded IPs
Browse files Browse the repository at this point in the history
  • Loading branch information
evantahler committed Dec 29, 2011
1 parent e215f80 commit 4ee450a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion initializers/initWebListen.js
Expand Up @@ -24,7 +24,8 @@ var initWebListen = function(api, next)
connection.responseHttpCode = 200;
if(connection.req.headers['x-forwarded-for'] != null)
{
connection.remoteIP = connection.req.headers['x-forwarded-for'];
var IPs = connection.req.headers['x-forwarded-for'].split(",");
connection.remoteIP = IPs[0];
}

// parse GET (URL) variables
Expand Down

0 comments on commit 4ee450a

Please sign in to comment.