Use the right header for remote IPs

This commit is contained in:
Jonathan Cremin 2016-08-07 20:41:21 +01:00
parent 2c577cb7ae
commit ffa01ba586
5 changed files with 5 additions and 5 deletions

View file

@ -24,7 +24,7 @@ export default class Uploader {
this.context = context;
this.expectedSize = context.request.headers['content-length'];
this.tempGuid = context.request.headers['hostr-guid'];
this.remoteIp = context.request.headers['x-real-ip'] || context.req.connection.remoteAddress;
this.remoteIp = context.request.headers['x-forwarded-for'] || context.req.connection.remoteAddress;
this.md5sum = crypto.createHash('md5');
this.lastPercent = 0;